Skip to content

Instantly share code, notes, and snippets.

@dansitu dansitu/convert.py
Created Mar 14, 2019

Embed
What would you like to do?
# Load TensorFlow
import tensorflow as tf
# Set up the converter
converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir)
converter.optimizations = [tf.lite.Optimize.OPTIMIZE_FOR_SIZE]
# Perform conversion and output file
tflite_quant_model = converter.convert()
output_dir.write_bytes(tflite_quant_model)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.