diff options
Diffstat (limited to 'code/weightvis.js')
| -rw-r--r-- | code/weightvis.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/code/weightvis.js b/code/weightvis.js index e3cec42..f61ec39 100644 --- a/code/weightvis.js +++ b/code/weightvis.js @@ -504,7 +504,7 @@ var NetVisualizer = (function() { NetVisualizer.prototype.activate = function(inputs) { // assumes the sigmoid function is used as activation - function activation(x) { return 0.5 + x / Math.sqrt(1 + 4 * x * x); } + function activation(x) { return 1 / (1 + Math.exp(-x)); } var weights = this.data[this.layout.data.batches-1][this.layout.data.epochs-1]; var lastLayerOut = inputs; var hasBias = false; @@ -525,6 +525,7 @@ var NetVisualizer = (function() { thisLayerOut[tar] = activation(thisLayerOut[tar]); } lastLayerOut = thisLayerOut; + //console.log("layer out", layer, lastLayerOut); } return lastLayerOut; }; |
