[英]tensorflow object_detection train.py error
我目前正在尝试重新训练Google的Tensorflow对象检测
我遵循了sentdex's
教程中的步骤(也许和你们许多人一样)。
在生成tf_records
并将它们移至目录models/research/object_detection
,应该为培训设置所有内容。
要初始化训练过程,我使用了: python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config
结果应该是命令行打印当前步骤和达到的精度,但是我得到了:
Traceback (most recent call last):
File "train.py", line 49, in <module>
from object_detection import trainer
File "/home/ubuntu/tensorflow/research/object_detection/trainer.py", line 27, in <module>
from object_detection.builders import preprocessor_builder
File "/home/ubuntu/tensorflow/research/object_detection/builders/preprocessor_builder.py", line 21, in <module>
from object_detection.protos import preprocessor_pb2
File "/home/ubuntu/tensorflow/research/object_detection/protos/preprocessor_pb2.py", line 71, in <module>
options=None, file=DESCRIPTOR),
TypeError: __new__() got an unexpected keyword argument 'file'
我正在使用Ubuntu 16.04在Amazon's g2.2xlarge
,该软件已准备好tensorflow
和nvidia cuda
驱动程序(我想)。
任何想法为什么会出错? 非常感谢!
您以某种方式使用了不同版本的Google协议缓冲区库。 preprocessor_pb2.py是使用protobuf的新版本(过去的3.5版)生成的,该版本将file
参数引入了生成的代码( https://github.com/google/protobuf/blob/9f80df026933901883da1d556b38292e14836612/CHANGES.txt#L74 )。 而且不管它呼吁在71行/home/ubuntu/tensorflow/research/object_detection/protos/preprocessor_pb2.py
必须在编译使用早期版本的protoc
,不具有这个领域。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.