【发布时间】:2021-06-17 16:01:20
【问题描述】:
我得到错误AttributeError: module 'tensorflow' has no attribute 'gfile' 所以我在网上发现现在我们必须将tf.gfile 更改为tf.io.gfile
所以我在C:\Anaconda\lib\site-packages\object_detection\utils\config_util.py 中更改了它,但它仍然不适合我。
错误:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-14-efc7822bb0d7> in <module>
----> 1 config = config_util.get_configs_from_pipeline_file(CONFIG_PATH)
C:\Anaconda\lib\site-packages\object_detection\utils\config_util.py in get_configs_from_pipeline_file(pipeline_config_path, config_override)
94 """
95 pipeline_config = pipeline_pb2.TrainEvalPipelineConfig()
---> 96 with tf.io.gfile.GFile(pipeline_config_path, "r") as f:
97 proto_str = f.read()
98 text_format.Merge(proto_str, pipeline_config)
AttributeError: module 'tensorflow' has no attribute 'gfile'
谁能帮帮我?
我是新手????
【问题讨论】:
-
请勿发布代码和错误的图片。
-
@yudhiesh 但是为什么呢?我想显示错误
标签: python tensorflow object-detection