【问题标题】:Tensorflow tf.gfile.GFileTensorFlow tf.gfile.GFile
【发布时间】:2021-07-19 10:52:52
【问题描述】:

我尝试将 tf.gfile.GFile 更改为 tf.io.gfile.GFile 并且还尝试了 import tensorflow.compat.v1 as tf 但没有任何效果。它没有读取新保存的文件。修改后我已经保存了。

AttributeError                            Traceback (most recent call last)
<ipython-input-52-efc7822bb0d7> in <module>
----> 1 config = config_util.get_configs_from_pipeline_file(CONFIG_PATH)

~/opt/anaconda3/lib/python3.8/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.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''''

【问题讨论】:

标签: tensorflow2.0 object-detection-api machine-learning-model


【解决方案1】:

将其更改为 tf.io.gfile.GFile。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-05
    • 1970-01-01
    • 2021-10-02
    • 2020-08-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多