This guide provides an overview of how to deploy TensorFlow Lite models for various platforms and devices.
Supported Platforms
Steps for Deployment
Convert the TensorFlow model to TensorFlow Lite format.
- Use the TensorFlow Lite Converter to convert your TensorFlow model to TensorFlow Lite format.
Optimize the TensorFlow Lite model for performance.
- Use the TensorFlow Lite Optimization Toolkit to optimize your model for performance.
Deploy the TensorFlow Lite model to your target platform.
- Follow the platform-specific deployment guides to deploy your model to your target platform.
Example
Here's an example of how to convert a TensorFlow model to TensorFlow Lite format:
python tensorflow/lite/tensorflow/lite/tools/convert.py \
--input_graph=/path/to/input_graph.pb \
--input_tensor=import/layer_name:0 \
--output_file=/path/to/output.tflite \
--input_shape=1,224,224,3
Resources
TensorFlow Logo