TF Lite is the new kid on the block and still in the developer view at the time of writing this book. TF Lite is a very small subset of TensorFlow Mobile and TensorFlow, so the binaries compiled with TF Lite are very small in size and deliver superior performance. Apart from reducing the size of binaries, TensorFlow employs various other techniques, such as:
- The kernels are optimized for various device and mobile architectures
- The values used in the computations are quantized
- The activation functions are pre-fused
- It leverages specialized machine learning software or hardware available on the device, such as theAndroid NN API
The workflow for using the models in TF Lite is as follows:
- Get the model: You can train your own model or pick a pre-trained model available from different sources, and use the pre-trained as is or retrain it with your own data, or retrain...