【发布时间】:2018-10-05 10:47:30
【问题描述】:
我使用以下命令编译了文件。
protoc object_detection/protos/*.proto --python_out=.
并因此编译成 .py 文件。
但是,我收到以下错误代码。
~/Documents/imgmlreport/inception/classification_inception/models/research/object_detection/utils/label_map_util.py in ()
20 import tensorflow as tf
21 from google.protobuf import text_format
---> 22 from object_detection.protos import string_int_label_map_pb2
23
24
ImportError: cannot import name 'string_int_label_map_pb2'
所以我检查了 utils,我已经有了一个 string_int_label_map_pb2.py
为什么不能导入 string_int_label_map_pb2.py ?
【问题讨论】:
-
我在尝试在 ML ENGINE 中运行训练作业时遇到了同样的错误。我按照github.com/tensorflow/models/blob/master/research/… 上给出的完整说明进行操作
-
你解决了这个问题吗?
-
是的,它确实有效。按照完整的说明进行操作。谢谢
标签: python tensorflow imagenet