Я пробовал изменить 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''''