There are many ways to deploy a trained neural network model to a mobile or embedded device. Different frameworks support Arm, including TensorFlow, PyTorch, Caffe2, MxNet, and CNTK on a various platforms, such as Android, iOS, and Linux. The deployment process for each is similar but every framework and operating system may use different tools. This walkthrough looks specifically at preparing TensorFlow models for deployment on Android, Linux, and iOS.

Optimization of a trained neural network model with TensorFlow follows these steps:

  1. Determine the names of the input and output nodes in the graph and the dimensions of the input data.
  2. Generate an optimized 32-bit model using TensorFlow's transform_graph tool.
  3. Generate an optimized 8-bit model that is more efficient but less accurate using TensorFlow's transform_graph tool.
  4. Benchmark the optimized models on-device and select the one that best meets your deployment needs.

This tutorial goes through each step in turn, using a pretrained ResNet-50 model (resnetv1_50.pb). The process is the same for other models, although input and output node names differ.

At the end of this tutorial, you will be ready to deploy your model on your chosen platform.