-
-
Save AkiyonKS/07878379589fb723ce8b4373072e5ef4 to your computer and use it in GitHub Desktop.
This file contains 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
converter = tf.lite.TFLiteConverter.from_keras_model(model_for_export) | |
pruned_tflite_model = converter.convert() | |
_, pruned_tflite_file = tempfile.mkstemp('.tflite') | |
with open(pruned_tflite_file, 'wb') as f: | |
f.write(pruned_tflite_model) | |
print('Saved pruned TFLite model to:', pruned_tflite_file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment