Python 运行TensorFlow对象检测API模型训练时出错

Python 运行TensorFlow对象检测API模型训练时出错,python,tensorflow,macos-sierra,object-detection,Python,Tensorflow,Macos Sierra,Object Detection,我遵循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(

我遵循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 --pipeline_config_path=object_detection/models/pet_model/ssd_mobilenet_v1_pets.config --train_dir=object_detection/models/pet_model/train
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