Forums - ONNX to dlc Conversion not supported

2 posts / 0 new
Last post
ONNX to dlc Conversion not supported
sckhilari
Join Date: 18 Jun 21
Posts: 2
Posted: Sat, 2021-06-19 13:35

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

  • Up0
  • Down0
ap.arunraj
Join Date: 20 Apr 20
Posts: 21
Posted: Mon, 2021-06-21 01:46

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

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.