For much more information, see the main page at: http://cs.stanford.edu/people/karpathy/convnetjs/
Convolutional Neural Network on MNIST digits: http://cs.stanford.edu/~karpathy/convnetjs/demo/mnist.html Convolutional Neural Network on CIFAR-10: http://cs.stanford.edu/~karpathy/convnetjs/demo/cifar10.html Neural Network with 2 hidden layers on toy 2D data: http://cs.stanford.edu/~karpathy/convnetjs/demo/classify2d.html
Train your own models
To run these locally it is recommended that you use Nodejs or you may run into cross-origin security issues and not being able to load images. Chrome will have this problem. Firefox will work fine but I found Chrome to run much faster and more consistently.
To setup a nodejs server and start training:
- install nodejs:
sudo apt-get install nodejs
cdinto convnetjs directory
- install the connect library for nodejs to serve static pages
npm install connect
- Access the demos. http://localhost:8080/demo/classify2d.html will just work out of the box, but mnist.html and cifar10.html will require that you download the datasets and parse them into images. (You can also use the ones on my webserver if you're clever enough to see how to change the paths but naturally I'd prefer if you didn't use too much of my bandwidth). The python scripts I used to parse the datasets are linked to from the demo pages and require numpy and scipy.
If you don't want to work on images but have some custom data, you probably want just a basic neural network with no convolutions and pooling etc. That means you probably want to use the
FullyConnLayer layer and stack it once or twice. Right now only ReLU (Rectified Linear Units: i.e. x -> max(0,x)) nonlinearity is supported, more (Maxout, Sigmoid?) are coming soon perhaps (but ReLUs work very well in practice).
Use in Node
npm install convnetjs
- var convnetjs = require("convnetjs");