PaddlePaddle / Anakin

High performance Cross-platform Inference-engine, you could run Anakin on x86-cpu,arm, nv-gpu, amd-gpu,bitmain and cambricon devices.
https://anakin.baidu.com/
Apache License 2.0
531 stars 135 forks source link

convert tool error when convert caffe model #129

Open HaoLiuHust opened 6 years ago

HaoLiuHust commented 6 years ago

liuhao@umaster:~/OpenSource/Anakin/tools/external_converter_v2$ python converter.py Traceback (most recent call last): File "converter.py", line 16, in from parser import File "/home/liuhao/OpenSource/Anakin/tools/external_converter_v2/parser/init.py", line 8, in from graph import File "/home/liuhao/OpenSource/Anakin/tools/external_converter_v2/parser/graph.py", line 6, in from proto import File "/home/liuhao/OpenSource/Anakin/tools/external_converter_v2/parser/proto/init.py", line 5, in from graph_pb2 import File "/home/liuhao/OpenSource/Anakin/tools/external_converter_v2/parser/proto/graph_pb2.py", line 15, in import node_pb2 as nodepb2 File "/home/liuhao/OpenSource/Anakin/tools/external_converter_v2/parser/proto/node_pb2.py", line 15, in import operator_pb2 as operatorpb2 File "/home/liuhao/OpenSource/Anakin/tools/external_converter_v2/parser/proto/operator_pb2.py", line 22, in serialized_pb=_b('\n\x0eoperator.proto\"e\n\x07OpProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\x0eis_commutative\x18\x02 \x01(\x08\x12\x0e\n\x06in_num\x18\x03 \x01(\x05\x12\x0f\n\x07out_num\x18\x04 \x01(\x05\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\tb\x06proto3') TypeError: new() got an unexpected keyword argument 'serialized_options'

HaoLiuHust commented 6 years ago

and the config file is:
OPTIONS: Framework: CAFFE SavePath: ./output ResultName: resnet50 Config: LaunchBoard: ON Server: ip: 127.0.0.1 port: 8888 OptimizedGraph: enable: OFF path: ./output/resnet50.anakin.bin LOGGER: LogToPath: ./log/ WithColor: ON

TARGET: CAFFE:

path to proto files

    ProtoPaths:
        - /home/liuhao/framework/caffe/src/caffe/proto/caffe.proto
    PrototxtPath: ./ResNet-50-deploy.prototxt
    ModelPath: ./ResNet-50-model.caffemodel
HaoLiuHust commented 6 years ago

seems protobuf need to be 3.4.0. After us protobuf 3.4, the error disappeared, but there will be another problem about caffe_yolo_pb, make some change to script will ignore this.

qichaotang commented 6 years ago

@HaoLiuHust hi, you convert tool successs?

HaoLiuHust commented 6 years ago

@qichaotang yes, make some change according to the error message. but there are other issues, for now, I have gave up to use it

Shixiaowei02 commented 6 years ago

@HaoLiuHust 您好!请检查 Pip Protobuf 与系统环境 Protobuf 版本是否完全一致,并都为 3.x 版本。谢谢!