Hi,
I have a model trained in pytorch end exported to ONNX with the current version of ONNX ( 1.9.1 ...I think ).
When I try to convert this convert to dlc using the executable given in the SDK I get:
ine 15, in import onnx File "/usr/local/lib/python3.6/dist-packages/onnx/__init__.py", line 11, in from onnx.external_data_helper import load_external_data_for_model, write_external_data_tensors, convert_model_to_external_data File "/usr/local/lib/python3.6/dist-packages/onnx/external_data_helper.py", line 14, in from .onnx_pb import TensorProto, ModelProto File "/usr/local/lib/python3.6/dist-packages/onnx/onnx_pb.py", line 8, in from .onnx_ml_pb2 import * # noqa File "/usr/local/lib/python3.6/dist-packages/onnx/onnx_ml_pb2.py", line 22, in serialized_pb=b'\n\x12onnx/onnx-ml.proto\x12\x04onnx\"\xe8\x04\n\x0e\x41ttributeProto\x12\x0c\n\x .....bunch of raw byt data
TypeError: __new__() got an unexpected keyword argument 'serialized_options'
I have not only tried my own model....but I tried onnx models given on the onnx website. It still does not work.
My protoc version is libprotoc 3.5.1
Can you help me to fix this issue ?
Thanks
Hello sckhilari,
I was able to convert an ONNX (v1.3.0) model (originally trained using pytorch) to DLC after installing protobuf version 3.6.1.
So try uninstalling the existing protobuf and install with the above mentioned version. Alternatively, please check the version of ONNX and its dependencies which are tested as given in the following link:
https://developer.qualcomm.com/docs/snpe/setup_onnx.html