View source on GitHub |
Converts a TensorFlow model into TensorFlow Lite model.
tf.lite.TFLiteConverter(
funcs, trackable_obj=None
)
Used in the notebooks
Used in the guide | Used in the tutorials |
---|---|
Example usage:
# Converting a SavedModel to a TensorFlow Lite model.
converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir)
tflite_model = converter.convert()
# Converting a tf.Keras model to a TensorFlow Lite model.
converter = tf.lite.TFLiteConverter.from_keras_model(model)
tflite_model = converter.convert()