tensorflow lite转换失败。出现“未定义符号:_ZTIN10tensorflow6DeviceE”

时间:2019-12-26 15:38:21

标签: tensorflow tensorflow-lite transfer-learning

tflite_model = converter.convert()
tflite_model_file = 'converted_model.tflite'

with open(tflite_model_file, "wb") as f:
  f.write(tflite_model)

当我最终使用点转换方法转换模型时, 我遇到了一些错误。

错误消息:

ValueError: Failed to parse the model: /tensorflow-2.1.0/python3.6/tensorflow_core/lite/python/optimize/_tensorflow_lite_wrap_calibration_wrapper.so: undefined symbol: _ZTIN10tensorflow6DeviceE.

源代码:

https://colab.research.google.com/github/tensorflow/examples/blob/master/courses/udacity_intro_to_tensorflow_lite/tflite_c02_transfer_learning.ipynb#scrollTo=BbTF6nd1KG2o

甚至我都没有找到

_ZTIN10tensorflow6DeviceE

如何转换转学模式?

1 个答案:

答案 0 :(得分:3)

我遇到了同样的问题-安装每夜构建(当前为'2.1.0-dev20200104')可以解决此问题。

!pip3 uninstall tensorflow
!pip3 install tf-nightly