commit | b4f2b92c63b9785df3f5fad3d1a6a0a0b560a71d | [log] [tgz] |
---|---|---|
author | Marc Kupietz <kupietz@ids-mannheim.de> | Mon Mar 12 12:24:26 2018 +0100 |
committer | Marc Kupietz <kupietz@ids-mannheim.de> | Mon Mar 12 12:24:26 2018 +0100 |
tree | fc5d323eabf8296df2a3ec0ad9c0f2953584ed4d | |
parent | 63872180823f347b4572a68061cdb52674aa274c [diff] |
derekovecs: fix gain clamping https://github.com/karpathy/tsnejs/commit/2d62a1c4a04ffe1c9cc7eb74898aa35f3b1b8385
diff --git a/js/tsne.js b/js/tsne.js index 57b3878..e125482 100644 --- a/js/tsne.js +++ b/js/tsne.js
@@ -254,7 +254,7 @@ // 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