Inference-Library-for-JavaScript/bagua-tensorflow at master · TianyouLi/Inference-Library-for-JavaScript · GitHub
Skip to content

Latest commit

 

History

History

Folders and files

README.md

How to build

Step 1 - Prepare tensorflow

Option 1 - How to build tensorflow from source code

See Download and Setup for instructions on how to install our release binaries or how to build from source.

Option 2 - Download prebuilt tensorflow

Download the prebuilt library.

put it under bagua-tensorflow/tensorflow.

Step 2 - Modify enviroment variables

cd bagua-tensorflow

# Modify LD_LIBRARY_PATH

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/tensorflow

Step 3 - How to build bagua-tensorflow

cd bagua-tensorflow

npm install

node-gyp configure build

Demo

Here we provided a MNIST demo.

cd demo/tf-mnist

# Train and export mnist model, the model file will be stored under model-zoo/tf/mnist

python mnist_train.py

# Run demo

node mnist.js