In this recipe, we will consider the different options to optimize TensorFlow code for running on a mobile device. Different options are analyzed, from reducing the size of the model to quantization.
Profiling a TensorFlow graph for mobile devices
Getting ready
We are going to use Bazel for building the different components of TensorFlow. Therefore, the first step is to make sure that both Bazel and TensorFlow are installed.
How to do it...
We proceed with profiling as follows:
- Install Android Studio from https://developer.android.com/studio/install.html.
- Install Bazel...