Forums - Resize Op for ONNX converter

3 posts / 0 new
Last post
Resize Op for ONNX converter
andy.yc_chen
Join Date: 10 Jun 19
Posts: 7
Posted: Tue, 2019-11-05 23:59

When I  tried to use snpe-onnx-to-dlc to convert my model ,then get the message "No schema registered for 'Resize".

(Our model consists of bilinear resize layers for upsampling with align corners)

Because SNPE does not currently support "resize" op ,the alternative way for me is to use "upsampling" instead.

But the performance of the model will be greatly affected.

So i want to know if there is a time schedule to let us know which op will be update and can be used ,especially "Resize" op for me.

Any suggestions would be greatly appreciated.

Here is the full console output.

Traceback (most recent call last):

  File "/home/andyyc_chen/snpe-1.30.0.480/lib/python/snpe/converters/onnx/onnx_to_ir.py", line 100, in convert
    self.op_info.validate_op_ver(src_op, supported_version)
  File "/home/andyyc_chen/snpe-1.30.0.480/lib/python/snpe/converters/onnx/onnx_translations.py", line 207, in validate_op_ver
    current_op_version = int(defs.C.get_schema(src_op.op_type, self.model_opset_version, '').since_version)
RuntimeError: No schema registered for 'Resize'!

2019-11-06 14:43:20,118 - 152 - ERROR - Node dc_upsample1: No schema registered for 'Resize'! 

OS: Ubuntu 16.04

Onnx version: 1.6.0

SNPE: 1.30.0.480

 

  • Up0
  • Down0
victor.escorcia
Join Date: 2 Mar 23
Posts: 5
Posted: Mon, 2023-03-06 07:16

Did you find a workaround for it?
I have the same issue with snpe-2.5.0.4052

I'm trying to export my Pytorch model to ONNX with opset_version=9 and it fails. AFAIU snpe only supports such opset_version.

I manage to export my model to ONNX with "opset_version=11". But, then I couldn't export the DLC using

snpe-onnx-to-dlc

 

Thanks in advance for any tip :)

  • Up0
  • Down0
victor.escorcia
Join Date: 2 Mar 23
Posts: 5
Posted: Wed, 2023-03-08 03:30

The solution is to refactor the module. Some alternatives are:
1. ConvTranspose2d
2. Implement it via concat and reshpae
3. Use PixelShuffle

  • 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.