Deep-Learning-For-Hackers icon indicating copy to clipboard operation
Deep-Learning-For-Hackers copied to clipboard

Exception when converting to TFLiteModel

Open alastor09 opened this issue 5 years ago • 0 comments

I was using the file "13.time-series-human_activity_recognition.ipynb"

And trying to convert the model to TfLite so that i can use it in Android Project am getting an exception.

Using Below code.

converter = tf.lite.TFLiteConverter.from_keras_model(model)
tflite_model = converter.convert()

# Save the model.
with open('model.tflite', 'wb') as f:
  f.write(tflite_model)

If you can suggest what could be the issue.

Observe the same issue for

model.save("./")

converter = tf.lite.TFLiteConverter.from_saved_model("./")
tflite_model = converter.convert()

converter.convert() is the line which throws

alastor09 avatar Oct 06 '20 06:10 alastor09