将 keras 模型转换为 tflite 模型时出现问题

时间:2021-06-26 15:05:44

标签: machine-learning google-colaboratory tensorflow-lite

我已经建立了一个多项逻辑回归模型。现在我想将其转换为 tflite 模型并将其保存以在我的移动应用程序中实现。我的编码如下:-

converter = tf.lite.TFLiteConverter.from_keras_model(model)
tflite_model = converter.convert()
with open('model.tflite','wb') as f:
  f.write(tflite_model)

当我运行单元格时,它显示如下问题

enter image description here

我一直在环顾四周,但没有找到解决方案。

0 个答案:

没有答案