如何在将 h5 转换为 tflite 之前使用来自 h5 的类?

时间:2020-12-27 20:10:15

标签: flutter tensorflow machine-learning keras

我需要在移动应用程序中使用我的模型,我已将模型转换为 tensor-flow lite。

代码示例:

model = tf.keras.models.load_model('fasion_CNN.h5')
converter = tf.lite.TFLiteConverter.from_keras_model(model)
tflite_model = converter.convert()
open("fashion.tflite", "wb").write(tflite_model)

问题是我如何获得标签,因为我的模型是一个分类模型?

0 个答案:

没有答案
相关问题