gpt4 book ai didi

python - TensorFlow 对象检测 API 错误

转载 作者:行者123 更新时间:2023-11-28 21:40:01 25 4
gpt4 key购买 nike

我正在使用 Tensorflow 对象检测 API 来训练我自己的对象检测器。准备好所需的一切后:我将data/train.record, test.record, training/object-detection.pbtxt, faster_rcnn_inception_resnet_v2_atrous_pets.config 放入object_detection 文件夹。运行

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

我收到错误:

`
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: =`

知道这个过程中有什么问题吗?

最佳答案

总结一下我的评论:

  • 去掉等号前后的空格。空格导致 Tensorflow 的参数解析器(基于 argparse 模块)将 '=' 解析为参数,这显然是错误的。您可以在错误消息中看到这种混淆:

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

关于python - TensorFlow 对象检测 API 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46080076/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com