Skip to content

Commit

Permalink
fixing minor bug, thank you @preuter for pointing it out
Browse files Browse the repository at this point in the history
  • Loading branch information
karpathy committed Oct 13, 2015
1 parent f35e84a commit 2d62a1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tsne.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ var tsnejs = tsnejs || { REVISION: 'ALPHA' };

// compute gain update
var newgain = sign(gid) === sign(sid) ? gainid * 0.8 : gainid + 0.2;
if(gainid < 0.01) gainid = 0.01; // clamp
if(newgain < 0.01) newgain = 0.01; // clamp
this.gains[i][d] = newgain; // store for next turn

// compute momentum step direction
Expand Down

0 comments on commit 2d62a1c

Please sign in to comment.