tflite_model = converter.convert()
tflite_model_file = 'converted_model.tflite'
with open(tflite_model_file, "wb") as f:
f.write(tflite_model)
当我最终在 dot convert 方法中转换模型时,
我有一些错误。
错误信息:
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
如何转换迁移学习模型?
最佳答案
我遇到了同样的问题 - 安装 nightly build(当前为“2.1.0-dev20200104”)解决了它。
!pip3 uninstall tensorflow
!pip3 install tf-nightly
关于tensorflow lite 转换失败。 "undefined symbol : _ZTIN10tensorflow6DeviceE"发生,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59490479/