Created
May 19, 2019 12:23
-
-
Save Tony607/c3fcbcfb9051fe14cd85fe9f743c75fc to your computer and use it in GitHub Desktop.
How to compress your Keras model x5 smaller with TensorFlow model optimization | DLology
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Create the .tflite file | |
| tflite_model_file = "/tmp/sparse_mnist.tflite" | |
| converter = tf.lite.TFLiteConverter.from_keras_model_file(pruned_keras_file) | |
| tflite_model = converter.convert() | |
| with open(tflite_model_file, "wb") as f: | |
| f.write(tflite_model) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment