Repository

nnabla-js

A JavaScript runtime for Neural Network Libraries. Preprocess utilities (e.g. image resizing) Please clone this repository and build from source const fs = require('fs'); const nna · License unknown · Install via pip · Maintenance unknown

License
Unknown

README

nnabla-js

test
license

A JavaScript runtime for Neural Network Libraries.

demo

key features

  • Run on web browsers
  • Load and execute .nnp files
  • Support GPU (WebGL)
  • Preprocess utilities (e.g. image resizing)

installation

nnabla-js is not available via NPM.
Please clone this repository and build from source

example

Check out more examples!

const fs = require('fs');
const nnabla = require('nnabla-js');

const x = [...Array(28 * 28)].map(() => Math.random() * 2.0 - 1.0);

// Load your NNP file
fs.readFile('mnist.nnp', (_, data) => {
  // Build computation graph from NNP
  nnabla.NNP.fromNNPData(data).then((nnp) => {
    // Forward propagation with the specified executor
    const output = nnp.forward('runtime', { 'x0': x });
  });
});

documentation

Documents are available in docs.

build

protoc command must be installed prior to build.

$ npm install
$ ./scripts/build_protobuf_file.sh
$ npm run build:dev

test

$ pip install nnabla & python scripts/create_test_nnp.py  # for the first time
$ npm run lint:fix  # code style check
$ npm test  # unit tests