From f04d9f1773b6a0e109867bc6a5546a716565b1a7 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sat, 9 Apr 2016 17:27:37 +0200 Subject: training --- code/weightviswrapper.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'code/weightviswrapper.js') diff --git a/code/weightviswrapper.js b/code/weightviswrapper.js index ca31916..52b60ed 100644 --- a/code/weightviswrapper.js +++ b/code/weightviswrapper.js @@ -17,7 +17,7 @@ var WeightVisWrapper = (function() { this.svgContainer .style("margin-top", "1.5em") .style("margin-bottom", "1em") - .style("height", "85%") // TODO find optimal height + .style("height", "75%") // TODO find optimal height .style("width", "100%"); this.spinner = this.container.append("div") @@ -96,7 +96,7 @@ var WeightVisWrapper = (function() { } }); this.slider.attr("max", this.steps()-1); - this.slider.node().addEventListener("input", function() { self.jumpTo(self.value); }); + this.slider.node().addEventListener("input", function() { self.jumpTo(this.value); }); this.button.node().addEventListener("click", function toggle() { if (self.button.attr("data-pressed") != "true") { var step = self.slider.node().value; @@ -185,13 +185,13 @@ var WeightVisWrapper = (function() { return this.netVisualizer.getSteps(); }; - WeightVisWrapper.prototype.calculate = function(inputs) { + WeightVisWrapper.prototype.calculate = function(inputs, step) { // returns the final layer's outputs - return this.netVisualizer.activate(inputs).pop(); + return this.netVisualizer.activate(inputs, step).pop(); }; - WeightVisWrapper.prototype.activate = function(inputs) { - this.netVisualizer.visualActivate(inputs); + WeightVisWrapper.prototype.activate = function(inputs, step) { + this.netVisualizer.visualActivate(inputs, step); }; return WeightVisWrapper; @@ -200,6 +200,7 @@ var WeightVisWrapper = (function() { /* helps with impress.js' stepenter/stepleave events */ // TODO move into its own file // TODO must be a step's direct child +// TODO not steppable var VisIntegrater = (function() { function VisIntegrater(enterCb, leaveCb, selector) { var self = this; -- cgit v1.3.1