【问题标题】:tensorflow object_detection train.py errortensorflow object_detection train.py 错误
【发布时间】:2018-01-19 12:19:10
【问题描述】:

我目前正在尝试重新训练 Google 的 Tensorflow Object Detection

我按照sentdex'stutorial 中的步骤操作(可能和你们中的许多人一样)。

在我生成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'

我正在使用带有 tensorflownvidia cuda 驱动程序的 Ubuntu 16.04 开发 Amazon's g2.2xlarge(我想)。

任何想法为什么错误?非常感谢!

【问题讨论】:

    标签: python tensorflow object-detection-api tfrecord


    【解决方案1】:

    你不知何故有不同版本的谷歌协议缓冲区库在起作用。 preprocessor_pb2.py 是使用新(过去 3.5)版本的 protobuf 生成的,它在生成的代码 (https://github.com/google/protobuf/blob/9f80df026933901883da1d556b38292e14836612/CHANGES.txt#L74) 中引入了 file 参数。无论它在/home/ubuntu/tensorflow/research/object_detection/protos/preprocessor_pb2.py 的第 71 行调用什么,都必须使用早期版本的 protoc 编译,它没有此字段。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-27
      • 1970-01-01
      • 1970-01-01
      • 2021-09-01
      • 2018-06-30
      • 2021-10-25
      • 1970-01-01
      • 2018-12-26
      相关资源
      最近更新 更多