将keras mode.h5转换为model.tflite给出了错误

时间:2020-02-23 09:27:26

标签: keras model h5py converters tf-lite

搜索后,我发现可以转换模型,但这给了我一个错误

代码:

import tensorflow as tf

converter = tf.lite.TFLiteConverter.from_saved_model('/home/usama/PycharmProjects/save_model/model.h5')
tflite_model = converter.convert()
open("converted_model.tflite", "wb").write(tflite_model)

错误:

转换器= tf.lite.TFLiteConverter.from_saved_model('/ home / usama / PycharmProjects / save_model / model.h5')

我该怎么办??

0 个答案:

没有答案