diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2016-04-09 17:27:37 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2016-04-10 12:27:38 +0200 |
| commit | f04d9f1773b6a0e109867bc6a5546a716565b1a7 (patch) | |
| tree | 3577eb139ca77e60f77ecfc8cabc98e653e67d7f /code/weightviswrapper.js | |
| parent | 44434149a061e03c94248ecc2a70a445fa0cdcd3 (diff) | |
| download | vortrag-knn-f04d9f1773b6a0e109867bc6a5546a716565b1a7.tar.gz vortrag-knn-f04d9f1773b6a0e109867bc6a5546a716565b1a7.zip | |
training
Diffstat (limited to 'code/weightviswrapper.js')
| -rw-r--r-- | code/weightviswrapper.js | 13 |
1 files changed, 7 insertions, 6 deletions
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; |
