for Node.js
NPM | Dependency | Build | Coverage |
---|---|---|---|
This library wraps Tensorflow Python for Node.js developers, it's powered by @pipcook/boa.
Notice: This project is still under active development and not guaranteed to have a stable API. This is especially true because the underlying TensorFlow C API has not yet been stabilized as well.
Installation
$ npm install tensorflow2 --save
Usage
const tf = ; // load mnist dataset.const dataset = tfkerasdataset;// {// train: { x: [Getter], y: [Getter] },// test: { x: [Getter], y: [Getter] }// } // create model.const model = tfkerasmodels;modelsummary; // compile the model.const loss_fn = tfkeraslosses;model; // train the model.model; // save the modelmodel;
See example/mnist.js for complete example.
Tests
$ npm test
License
MIT licensed @ 2020