diff --git a/.bowerrc b/.bowerrc new file mode 100644 index 00000000..9520cda3 --- /dev/null +++ b/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory" : "demo/bower_components" +} \ No newline at end of file diff --git a/Gulpfile.js b/Gulpfile.js new file mode 100644 index 00000000..764bf843 --- /dev/null +++ b/Gulpfile.js @@ -0,0 +1,45 @@ +var gulp = require('gulp'); +var jshint = require('gulp-jshint'); +var browserSync = require('browser-sync'); +const reload = browserSync.reload; +gulp.task('copy', () => + gulp.src([ + 'build/**/*' + ], { + base: './' + }).pipe(gulp.dest('demo')) +); +// jshint files +gulp.task('jshint', function () { + //gulp.src(['test/**/*.js']) + // .pipe(jshint()) + // .pipe(jshint.reporter()); +}); +// start local http server for development +gulp.task('http-server', function () { + browserSync({ + notify: false, + // Customize the Browsersync console logging prefix + logPrefix: 'WSK', + // Allow scroll syncing across breakpoints + scrollElementMapping: ['main', '.mdl-layout'], + // Run as an https by uncommenting 'https: true' + // Note: this uses an unsigned certificate which on first access + // will present a certificate warning in the browser. + // https: true, + server: ['.tmp', 'demo'], + port: 3000 + }); + gulp.watch(['demo/**/*'], reload); +}); +// start local http server with watch and livereload set up +gulp.task('server', function () { + gulp.run('http-server'); +}); +gulp.task('default', function () { + gulp.run('jshint', 'copy', 'server'); +}); +gulp.task('serve', function () { + gulp.run('default'); +}); + diff --git a/bower.json b/bower.json index 6158a6d8..31b1ec52 100644 --- a/bower.json +++ b/bower.json @@ -27,5 +27,8 @@ "bower_components", "test", "tests" - ] + ], + "dependencies": { + "codemirror": "^5.15.2" + } } diff --git a/demo/index.html b/demo/index.html new file mode 100644 index 00000000..58bfdaea --- /dev/null +++ b/demo/index.html @@ -0,0 +1,29 @@ + + +
+ +The simulation below is a 1-dimensional regression where a neural network is trained to regress to y coordinates for every given point x through an L2 loss. That is, the minimized cost function computes the squared difference between the predicted y-coordinate and the "correct" y coordinate. Every 10th of a second, all points are fed to the network multiple times through the trainer class to train the network.
+The simulation below is a 1-dimensional regression where a neural network is trained to regress to y coordinates + for every given point x through an L2 loss. That is, the minimized cost function computes the squared difference + between the predicted y-coordinate and the "correct" y coordinate. Every 10th of a second, all points are fed to + the network multiple times through the trainer class to train the network.
-The simulation below will eval() whatever you have in the text area and reload. Feel free to explore and use ConvNetJS to instantiate your own network!
+The simulation below will eval() whatever you have in the text area and reload. Feel free to explore and use + ConvNetJS to instantiate your own network!
-Report questions/bugs/suggestions to @karpathy.
+Report questions/bugs/suggestions to @karpathy.
-Add data points by clicking!
+Add data points by clicking!
-