summaryrefslogtreecommitdiff
path: root/code/weightvis.js
diff options
context:
space:
mode:
Diffstat (limited to 'code/weightvis.js')
-rw-r--r--code/weightvis.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/code/weightvis.js b/code/weightvis.js
index f777755..5265cee 100644
--- a/code/weightvis.js
+++ b/code/weightvis.js
@@ -288,12 +288,13 @@ var NetVisualizer = (function() {
};
NetVisualizer.prototype.stopAnimation = function() {
- this.animator.stop();
+ if (this.animator) this.animator.stop();
};
NetVisualizer.prototype.animate = function(animationTime, resolution, step) {
// animationTime in seconds per frame
// resolution in epochs per frame
+ if (!step) step = 0;
var self = this;
var batch = Math.floor(step / this.layout.data.epochs),
epoch = step % this.layout.data.epochs;