This package is not meant to replace the excellent convnet.js, but provide a lower-level package.
A fast low-level javascript package for multi-threaded neural net layers for the browser.
For now, this package only implements the forward ops, and does not implement backward.
It is useful when porting Torch models to the browser.
For example, it powers the browser demo in: http://soumith.ch/eyescream
nn.SpatialConvolution(weight, bias, padH, padW)
nn.SpatialMaxPooling(kH, kW, dH, dW)
nn.ReLU()
nn.Linear(weight, bias)
nn.View(shape)
nn.Sequential()
nn.JoinTable(dim)
nn.ParallelTable()
nn.Identity()
###Uses:
###Dependencies:
###Unit tests:
Unit tests can be run via nodejs.
$ npm -g install mocha
$ cd nnjs
$ mocha
SpatialConvolution
✓ Should compare against torch convolutions (126ms)
SpatialMaxPooling
✓ Should compare against torch SpatialMaxPooling
Linear
✓ Should compare against torch Linear layer
Loader
✓ Should load a full multi-layer model and compare against torch result (3051ms)
4 passing (3s)
npm install -g browserify
browserify -r ./js/init.js:nn -r ndarray -r ndarray-fill -o static/js/nn.js