简体   繁体   中英

TensorFlow Object Detection API error

I am using Tensorflow Object Detection API to train my own object detector. After preparing everything needed: I put data/train.record, test.record , training/object-detection.pbtxt, faster_rcnn_inception_resnet_v2_atrous_pets.config into the folder of object_detection . Run

python train.py --logtostderr --train_dir = training/ --pipeline_config_path = training/faster_rcnn_inception_resnet_v2_atrous_pets.config

I got error:

`
username@host:~/Documents/tensorflowModels/object_detection$ python train.py --logtostderr --train_dir = training/ --pipeline_config_path = training/faster_rcnn_inception_resnet_v2_atrous_pets.config
Traceback (most recent call last):
  File "train.py", line 198, in <module>
    tf.app.run()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "train.py", line 143, in main
    model_config, train_config, input_config = get_configs_from_pipeline_file()
  File "train.py", line 103, in get_configs_from_pipeline_file
    text_format.Merge(f.read(), pipeline_config)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/file_io.py", line 118, in read
    self._preread_check()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/file_io.py", line 78, in _preread_check
    compat.as_bytes(self.__name), 1024 * 512, status)
  File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/usr/local/lib/python2.7/dist-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.NotFoundError: =`

Any idea what is wrong in the process?

To summerize my comment:

  • Remove the spaces in front and behind the equal sign. The spaces cause the argument parser of Tensorflow (which is based on the argparse module) to parse the '=' as argument, which is obviously wrong. You can see this confusion in the error message:

tensorflow.python.framework.errors_impl.NotFoundError: =`

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM