【问题标题】:Failed to construct interpreter TensorflowLite未能构建解释器 TensorflowLite
【发布时间】:2021-01-26 09:35:30
【问题描述】:

我正在使用`

Cuda 10.1、cudnn 7.6、Tensorflow 2.3.0、keras 2.4.3

训练模型时我使用save_weights_only=True,并保存一个文件夹,包括:

资产、变量和saved_model.pb

当我使用以下方法将模型转换为 tflite 模型时:

converter = tf.lite.TFLiteConverter.from_saved_model('x/210126_Test')
tflite_model = converter.convert()

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

我没有收到任何错误,但当我尝试在 iPad 应用程序中使用该模型时,它只返回以下内容:

“异常错误:无法构造解释器”

有没有人经历过或知道可能的解决方案?

.

【问题讨论】:

    标签: python-3.x tensorflow keras


    【解决方案1】:

    通过更改软件包版本解决了问题。

    Tensorflow = 2.0.0 & Keras = 2.3.1

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-09-20
      • 1970-01-01
      • 2010-09-08
      • 2011-03-23
      相关资源
      最近更新 更多