Instantly share code, notes, and snippets.

Embed
What would you like to do?
Enabling post-training quantization
converter=tf.contrib.lite.TocoConverter.from_saved_model(saved_model_dir)
converter.post_training_quantize=True
tflite_quantized_model=converter.convert()
open(“quantized_model.tflite”, “wb”).write(tflite_quantized_model)
@Akhtar303nu

This comment has been minimized.

Show comment
Hide comment
@Akhtar303nu

Akhtar303nu Sep 24, 2018

Hi I am trying same code but its genrate error
I saved_model_dir which contain mars-small128.pb but it genrate error
OSError: SavedModel file does not exist at: model_data/saved_model.pb/{saved_model.pbtxt|saved_model.pb}
Thanks

Akhtar303nu commented Sep 24, 2018

Hi I am trying same code but its genrate error
I saved_model_dir which contain mars-small128.pb but it genrate error
OSError: SavedModel file does not exist at: model_data/saved_model.pb/{saved_model.pbtxt|saved_model.pb}
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment