Closed Kengazi closed 4 years ago
Was able to be successful using this script
!pip install tensorflow==1.15.0
import tensorflow as tf
print(tf.version)
converter = tf.lite.TFLiteConverter.from_keras_model_file("robot_eyes2.h5") # model.h5
tflite_model = converter.convert()
open("Robot_Eyes.tflite", "wb").write(tflite_model)
I am sorry that I did not check this issue thread earlier. I hope it is resolved now. I do not understand the relevance of the issue. Anyway, I am glad that it is fixed now :) I am closing it.
Having trouble turning in Google Colab python in turning a Keras "model.h5" using TFLiteConverter.from_keras_model("model.h5")
I am using tensorflow 2.2.0
First attempt script
import tensorflow as tf converter = tf.lite.TFLiteConverter.from_keras_model("model.h5") tflite_model = converter.convert() open("Robot_Eyes.tflite", "wb").write(tflite_model)
And Error gotten
AttributeError Traceback (most recent call last)