tensorflow lite 转换失败。 "undefined symbol : _ZTIN10tensorflow6DeviceE"发生

标签 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)

当我最终在 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/

相关文章:

tensorflow - 对象检测API错误:“导入错误:无法导入名称anchor_generator_pb2”

python - 如何在 Mandlebrot tensorflow 程序中显示图像。当前输出是 <IPython.core.display.Image object>

python - 当已经使用 pip 安装 Tensorflow 时,从源代码安装 Tensorflow

python - 如何正确地将 tflite_graph.pb 转换为 detect.tflite

tensorflow - 关于tensorflow lite量化代码、论文和文档不一致的问题

machine-learning - 当向预训练的 CNN 添加层时,您是添加到开头还是后面。它像队列还是堆栈?

python - 移动网V2 : Importing graph with lower producer version into a graph with higher producer version

javascript - 如何在javascript中导入tensorflow?导入文件,由本地 http 服务器提供服务

android - 如何将 TensorFlow JSON 图形模型转换为 .tflite?

python - 使用预训练的 BERT 模型进行错误多类文本分类