-
-
Save nodamu/1d0e4885ae1905f76a8b4463aa5a5019 to your computer and use it in GitHub Desktop.
kerasToTflite.py
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
| import tensorflow as tf | |
| keras_model = "tomato_weights_best.hdf5" | |
| tflite_model = "tomato_model.tflite" | |
| converter = tf.lite.TFLiteConverter.from_keras_model_file(keras_model) | |
| tflite_model = converter.convert() | |
| open(tflite_model, "wb").write(tflite_model) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note the import statement, tflite has been moved from contrib