PaddlePaddle / Paddle2ONNX

ONNX Model Exporter for PaddlePaddle
Apache License 2.0
738 stars 173 forks source link

paddleocr模型转onnx #124

Open amandazw opened 4 years ago

amandazw commented 4 years ago

load the model parameter done. Traceback (most recent call last): File "D:/work/video/beauty_ocr_sdk/paddle2onnx-develop/paddle2onnx-develop/fluid_onnx/fluid_to_onnx.py", line 235, in main() File "D:/work/video/beauty_ocr_sdk/paddle2onnx-develop/paddle2onnx-develop/fluid_onnx/fluid_to_onnx.py", line 231, in main convert(args) File "D:/work/video/beauty_ocr_sdk/paddle2onnx-develop/paddle2onnx-develop/fluid_onnx/fluid_to_onnx.py", line 141, in convert node_proto = ops.node_maker[str(op.type)](op, block) TypeError: 'str' object is not callable

请问这是什么问题呢?

amandazw commented 4 years ago

node_maker字典中的这句话'hard_sigmoid': 'HardSigmoid', # Caffe2 error 造成了以下错误: File "D:/work/video/beauty_ocr_sdk/paddle2onnx-develop/paddle2onnx-develop/fluid_onnx/fluid_to_onnx.py", line 143, in convert node_proto = ops.node_maker[str(op.type)](operator=op, block=block) TypeError: 'str' object is not callable

jiangjiajun commented 4 years ago

参考此说明文档 https://github.com/PaddlePaddle/paddle2onnx/blob/develop/README.md