运行“ python eval.py” NewRandomAccessFile时出错,无法创建/打开

时间:2018-10-01 07:13:43

标签: python tensorflow object-detection-api

我运行python eval.py评估我的模型,但出现以下错误。


(tensorflow1) C:\tensorflow1\models\research\object_detection>python legacy/eval.py --logtostderr --checkpoint_dir=C:/tensorflow1/models/research/object_detection/training/ --eval_dir=C:/tensorflow1/models/research/object_detection/eval/ pipeline_config_path=C:/tensorflow1/models/research/object_detection/training/faster_rcnn_inception_v2_pets.config

**WARNING**:tensorflow:From C:\Users\tky\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\platform\app.py:125: main (from __main__) is deprecated and will be removed in a future version.
**Instructions for updating:**Use object_detection/model_main.py.


W1001 15:35:00.024803  2044 tf_logging.py:125] From C:\Users\tky\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\platform\app.py:125: main (from __main__) is deprecated and will be removed in a future version.
Instructions for updating:
Use object_detection/model_main.py.
Traceback (most recent call last):
  File "legacy/eval.py", line 142, in <module>
    tf.app.run()
  File "C:\Users\tky\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
    _sys.exit(main(argv))
  File "C:\Users\tky\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\util\deprecation.py", line 306, in new_func
    return func(*args, **kwargs)
  File "legacy/eval.py", line 103, in main
    tf.gfile.Copy(config, os.path.join(FLAGS.eval_dir, name), overwrite=True)
  File "C:\Users\tky\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 397, in copy
    compat.as_bytes(oldpath), compat.as_bytes(newpath), overwrite, status)
  File "C:\Users\tky\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 526, in __exit__
    c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open:  : \udc8ew\udc92\u80b3\udc82\ua0bd\udc83p\udc83X\udc82\udcaa\udc8c\udca9\udc82\x82\udca9\udc82\udce8\udc82\u0702\udcb9\udc82\udcf1\udc81B
; No such process 

我尝试了各种解决方案,但是错误没有解决。 我无法理解此错误,请帮助我。谢谢。

1 个答案:

答案 0 :(得分:0)

您应该使用正确的参数运行命令。您在--忘记了pipeline_config_path。喜欢:

python legacy/eval.py --logtostderr --checkpoint_dir=C:/tensorflow1/models/research/object_detection/training/ --eval_dir=C:/tensorflow1/models/research/object_detection/eval/ --pipeline_config_path=C:/tensorflow1/models/research/object_detection/training/faster_rcnn_inception_v2_pets.config