TensorFlow Lite is a set of tools to help developers run TensorFlow models on mobile, embedded, and IoT devices. It enables on-device machine learning inference with low latency and a small binary size.
TensorFlow Lite consists of two main components:
TensorFlow Lite is designed to make it easy to perform machine learning on devices, “at the edge” of the network, instead of sending data back and forth from a server. For developers, performing machine learning on-device can help improve:
TensorFlow Lite works with a huge range of devices, from tiny microcontrollers to powerful mobile phones.
Key Point: The TensorFlow Lite binary is smaller than 300KB when all supported operators are linked, and less than 200KB when using only the operators needed for supporting the common image classification models InceptionV3 and MobileNet.
To begin working with TensorFlow Lite on mobile devices, visit Get started. If you want to deploy TensorFlow Lite models to microcontrollers, visit Microcontrollers.
The workflow for using TensorFlow Lite involves the following steps:
Pick a model
Bring your own TensorFlow model, find a model online, or pick a model from our Pre-trained models to drop in or retrain.
Convert the model
If you're using a custom model, use the TensorFlow Lite converter and a few lines of Python to convert it to the TensorFlow Lite format.
Deploy to your device
Run your model on-device with the TensorFlow Lite interpreter, with APIs in many languages.
Optimize your model
Use our Model Optimization Toolkit to reduce your model's size and increase its efficiency with minimal impact on accuracy.
To learn more about using TensorFlow Lite in your project, see Get started.
TensorFlow Lite plans to provide high performance on-device inference for any TensorFlow model. However, the TensorFlow Lite interpreter currently supports a limited subset of TensorFlow operators that have been optimized for on-device use. This means that some models require additional steps to work with TensorFlow Lite.
To learn which operators are available, see Operator compatibility.
If your model uses operators that are not yet supported by TensorFlow Lite interpreter, you can use TensorFlow Select to include TensorFlow operations in your TensorFlow Lite build. However, this will lead to an increased binary size.
TensorFlow Lite does not currently support on-device training, but it is in our Roadmap, along with other planned improvements.
Want to keep learning about TensorFlow Lite? Here are some next steps: