我正在使用google cloud vm实例开发我的自定义对象检测器 - TENSORFLOW对象检测API。我正在使用预训练模型
:faster_rcnn_inception_resnet_v2_atrous_coco
在为输入创建所有必需的TFrecord文件并配置object_detection管道配置文件后,我使用以下命令进行培训:
python train.py --logtostderr --train_dir=training /
--pipeline_config_path=training/faster_rcnn_custom.config
我收到以下错误:
Traceback (most recent call last):
File "train.py", line 184, 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 180, in main
graph_hook_fn=graph_rewriter_fn)
File "/opt/models/research/object_detection/trainer.py", line 274, in train
train_config.prefetch_queue_capacity, data_augmentation_options)
File "/opt/models/research/object_detection/trainer.py", line 59, in create_input_queue
tensor_dict = create_tensor_dict_fn()
File "train.py", line 121, in get_next
dataset_builder.build(config)).get_next()
File "/opt/models/research/object_detection/builders/dataset_builder.py", line 176, in build
num_additional_channels=num_additional_channels)
File "/opt/models/research/object_detection/data_decoders/tf_example_decoder.py", line 204, in __init__
repeated=True)
TypeError: __init__() got an unexpected keyword argument 'repeated'
我该如何修复错误?我很陌生。任何帮助将不胜感激。
答案 0 :(得分:0)
检查命令的正确性以及配置文件是否位于正确的相对嵌套目录中。我看到&#34; training /&#34;之间有一个空格。它应该是&#34;培训/&#34;
答案 1 :(得分:0)
我的假设是错误是由于文件tf_example_decoder.py与安装的Tensorflow不兼容造成的。尝试删除该参数。希望这会有所帮助。
答案 2 :(得分:0)
我有类似的问题。我安装了较旧的tensorflow并尝试使用新模型,升级tensorflow解决了我的问题。