【问题标题】:Errors when running TensorFlow object detection API model training运行 TensorFlow 对象检测 API 模型训练时出错
【发布时间】:2017-09-24 10:52:31
【问题描述】:

我按照 TensorFlow 对象检测 API 的说明进行操作,并尝试使用牛津猫数据集训练模型,我按照说明执行了每一步,但训练过程没有开始并给出了一些错误,有类似错误的人可以和我分享经验吗?

我的系统是 macOS Sierra 10.12.4,Python 版本 2.7.13

错误信息是

Traceback (most recent call last):
  File "object_detection/train.py", line 197, in <module>
    tf.app.run()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "object_detection/train.py", line 144, in main
    model_config, train_config, input_config = get_configs_from_multiple_files()
  File "object_detection/train.py", line 126, in get_configs_from_multiple_files
    text_format.Merge(f.read(), train_config)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/lib/io/file_io.py", line 125, in read
    pywrap_tensorflow.ReadFromStream(self._read_buf, length, status))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status
    pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.FailedPreconditionError: .

我在控制台中运行的命令:

python object_detection/train.py --logtostderr --pipline_config_path=object_detection/models/pet_model/ssd_mobilenet_v1_pets.config --train_dir=object_detection/models/pet_model/train

【问题讨论】:

    标签: python tensorflow macos-sierra object-detection


    【解决方案1】:

    更新

    只要找到这个问题的答案,它是由一个错字引起的。命令应该是

    python object_detection/train.py --logtostderr --pipeline_config_path=object_detection/models/pet_model/ssd_mobilenet_v1_pets.config --train_dir=object_detection/models/pet_model/train
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-06-14
      • 2018-01-01
      • 1970-01-01
      • 2019-06-28
      • 2019-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多