diff options
Diffstat (limited to 'code/weightviswrapper.js')
| -rw-r--r-- | code/weightviswrapper.js | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/code/weightviswrapper.js b/code/weightviswrapper.js index 22bbe63..1f17b55 100644 --- a/code/weightviswrapper.js +++ b/code/weightviswrapper.js @@ -191,16 +191,7 @@ var WeightVisWrapper = (function() { }; WeightVisWrapper.prototype.activate = function(inputs) { - // TODO this should be in weightvis.js - // …this is rather a hack, I got lazy… - var activations = this.netVisualizer.activate(inputs); - var flatActivations = [].concat.apply([], activations); - var max = d3.max(flatActivations, Math.abs), - min = d3.min(flatActivations, Math.abs); - var node = this.svg.selectAll(".node"); - node - .attr("r", function(d) { return 2 * d.r * (Math.abs(activations[d.layer][d.node]) - min) / (max-min); }) - .style("fill", function(d) { return activations[d.layer][d.node]>0?nodeColor:nodeColorAlt; }); + this.netVisualizer.visualActivate(inputs); }; return WeightVisWrapper; |
