Overview Before you begin Run Ubuntu Linux on the HiKey 960 Build an Ubuntu filesystem Flash the base firmware and OS Flash the base firmware and OS - recovery mode Flash the base firmware and OS - fastboot mode Boot Linux Add more diskspace MNIST Draw MNIST Draw - Setup MNIST Draw - Machine Learning model MNIST Draw - MNIST demo application Streamline Streamline - Run the MNIST inference Streamline - Use Streamline to connect and profile the application Streamline - Automate the launch and capture Next steps
MNIST Draw
MNIST demo application
The MNIST demo application uses a TensorFlow neural network that is trained for MNIST. The demo application also uses Arm NN for inference on Arm Cortex-A or Mali. There are two example applications, one with the simple NN and one with a better neural network. Look at the C++ files for each version: mnist_tf_convol.cpp is the better NN, and mnist_tf_simple.cpp is the simple single-layer network. Both applications read a TensorFlow model. Models are stored in the model/ directory in protobuf binary format. The MNIST data is stored in directory data/ in a simple format that is designed for storing vectors. This directory contains the MIST test data and labels. Build the applications using make, as shown here:
$ cd $HOME/Tools-Solutions/ml-tool-examples/mnist-demo $ make
The make builds both applications.
The purpose of these examples is to demonstrate how to use Arm NN to load and execute TensorFlow models in a C++ application.