“ object_detection.protos.SsdFeatureExtractor”没有名为“ use_depthwise”的字段

时间:2019-02-06 11:12:18

标签: python tensorflow protobuf-c

我想在运行训练步骤时使用ssd_mobilenet_v2_coco_2018_03_29训练我的张量流对象检测模型:

id

它抛出

python object_detection/train.py --logtostderr--train_dir=train         
--pipeline_config_path=ssd_mobilenet_v2_coco_2018_03_29/pipeline.config

我的配置文件:


Traceback (most recent call last):
File "object_detection/train.py", line 198, in <module>
tf.app.run()
File "/home/user/tensor/lib/python3.5/site- 
packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
 File "object_detection/train.py", line 143, in main
model_config, train_config, input_config = 
get_configs_from_pipeline_file()
File "object_detection/train.py", line 103, in 
get_configs_from_pipeline_file
text_format.Merge(f.read(), pipeline_config)
File "/home/user/tensor/lib/python3.5/site- 
packages/google/protobuf/text_format.py", line 536, in Merge
descriptor_pool=descriptor_pool)
File "/home/user/tensor/lib/python3.5/site- 
packages/google/protobuf/text_format.py", line 590, in MergeLines
return parser.MergeLines(lines, message)
File "/home/user/tensor/lib/python3.5/site- 
packages/google/protobuf/text_format.py", line 623, in MergeLines
 self._ParseOrMerge(lines, message)
File "/home/user/tensor/lib/python3.5/site- 
packages/google/protobuf/text_format.py", line 638, in _ParseOrMerge
self._MergeField(tokenizer, message)
File "/home/user/tensor/lib/python3.5/site- 
packages/google/protobuf/text_format.py", line 763, in _MergeField
merger(tokenizer, message, field)
File "/home/user/tensor/lib/python3.5/site- 
packages/google/protobuf/text_format.py", line 837,in _ 

google.protobuf.text_format.ParseError: 80:7 : Message type 
"object_detection.protos.SsdFeatureExtractor" has no field named 
 "use_depthwise".

我在这里使用2个课程。 我从https://github.com/tensorflow/models/blob/master/research/object_detection/samples/configs/ssd_mobilenet_v2_coco.config复制了配置文件 我的Tensorflow版本:1.12.0 protobuf:3.6.1

1 个答案:

答案 0 :(得分:0)

如果您编译的原型来自旧版本,则可能会发生这种情况。确保您的原型文件(在/ proto下)是最新的,然后按照以下说明重新编译它们:

componentDidUpdate() {
  this.getCharData();
}

重新编译原型后,请尝试再次训练。