How to fix the bug “Expected "required", "optional", or "repeated".”?

参考:https://github.com/tensorflow/models/issues/1834

You need to download protoc version 3.3 (already compiled). Used protoc inside bin directory to run this command like this:
tensorflow$ mkdir protoc_3.3
tensorflow$ cd protoc_3.3
tensorflow/protoc_3.3$ wget wget https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip
tensorflow/protoc_3.3$ chmod 775 protoc-3.3.0-linux-x86_64.zip
tensorflow/protoc_3.3$ unzip protoc-3.3.0-linux-x86_64.zip
tensorflow/protoc_3.3$ cd ../models/
tensorflow/protoc_3.3$ /home/humayun/tensorflow/protoc_3.3/bin/protoc object_detection/protos/*.proto --python_out=.

It will work hopefullly.

Humayun

原文地址:https://www.cnblogs.com/YouXiangLiThon/p/7590779.html