Python 培训时在config_util.py中拒绝Tensorflow访问

Python 培训时在config_util.py中拒绝Tensorflow访问,python,tensorflow,access-denied,Python,Tensorflow,Access Denied,我在tensorflow中训练模型时遇到问题。我正在Windows 10上工作。当我运行命令时: python ./object_detection/model_main.py --pipeline_config_path=C:/Tensorflow/object-detection/ssd_mobilenet_v1_coco_2018_01_28 --model_dir=C:/Tensorflow/object-detection/output-model --num_train_steps=

我在tensorflow中训练模型时遇到问题。我正在Windows 10上工作。当我运行命令时:

python ./object_detection/model_main.py --pipeline_config_path=C:/Tensorflow/object-detection/ssd_mobilenet_v1_coco_2018_01_28 --model_dir=C:/Tensorflow/object-detection/output-model --num_train_steps=50000 --sample_1_of_n_eval_examples=1 --alsologtostderr
从C:/Tensorflow/models/research开始训练过程,我在config_util.py脚本的第95行proto_str=f中得到一个错误。在下面 您可以看到我的整个控制台输出:

Traceback (most recent call last):
  File "./object_detection/model_main.py", line 109, in <module>
    tf.app.run()
  File "C:\Users\lucci\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
    _sys.exit(main(argv))
  File "./object_detection/model_main.py", line 71, in main
    FLAGS.sample_1_of_n_eval_on_train_examples))
  File "C:\Tensorflow\models\research\object_detection\model_lib.py", line 536, in create_estimator_and_inputs
    config_override=config_override)
  File "C:\Tensorflow\models\research\object_detection\utils\config_util.py", line 95, in get_configs_from_pipeline_file
    proto_str = f.read()
  File "C:\Users\lucci\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 125, in read
    self._preread_check()
  File "C:\Users\lucci\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 85, in _preread_check
    compat.as_bytes(self.__name), 1024 * 512, status)
  File "C:\Users\lucci\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 528, in __exit__
    c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.UnknownError: NewRandomAccessFile failed to Create/Open: C:/Tensorflow/object-detection/ssd_mobilenet_v1_coco_2018_01_28 : Zugriff verweigert
; Input/output error
错误出现在最后两行:Zugriff verweigert是德国人,表示访问被拒绝。 我是这台电脑的管理员这是我自己的电脑,我可以完全控制文件夹,我用PowerShell对其进行了双重检查。当我尝试将文件夹移动到其他文件夹时 放置,例如C:\Users\lucci\Documents\I会出现相同的错误。当我以管理员身份运行控制台时,当我尝试命令runas/user:lucci时,问题仍然存在。。。和 等等

有人能帮我吗? 我正在使用Python3.6


编辑:这也没有帮助:

我终于自己找到了解决方案。不管您是在Linux还是Windows上操作。 运行该命令时,始终必须指定pipeline.config文件的完整路径。 因此,当pipeline.config文件位于C:/ObjectDetection/Model/pipeline.config中时,它不是 足以指定位置,如C:/ObjectDetection/。您必须指定位置 作为C:/ObjectDetection/pipeline.config


使用参数-pipeline\u config\u文件的完整路径再次运行该命令非常有用

我终于自己找到了解决办法。不管您是在Linux还是Windows上操作。 运行该命令时,始终必须指定pipeline.config文件的完整路径。 因此,当pipeline.config文件位于C:/ObjectDetection/Model/pipeline.config中时,它不是 足以指定位置,如C:/ObjectDetection/。您必须指定位置 作为C:/ObjectDetection/pipeline.config

使用参数-pipeline\u config\u文件的完整路径再次运行该命令非常有用