Forums - dose onnx2dlc support Asymmetric padding now or in future?

2 posts / 0 new
Last post
dose onnx2dlc support Asymmetric padding now or in future?
980686291
Join Date: 17 Nov 20
Posts: 5
Posted: Thu, 2022-08-11 02:41

while i'm converting my onnx model 

it reported like :

2022-08-10 23:44:44,705 - 214 - INFO - INFO_DLC_SAVE_LOCATION: Saving model at /model_repo/498937/snpe/params Encountered Error: Unsupported Asymmetric padding values [3, 3, 2, 2] for node pnasnet0_pnasunit5_dwsbranch0_nasdwsconv0_dwsconv0_conv0 Stack Trace: Traceback (most recent call last): File "/opt/source/easyedge-snpe/bin/x86_64-linux-clang/snpe-onnx-to-dlc", line 53, in <module> backend.save(optimized_graph) File "/opt/source/easyedge-snpe/lib/python/qti/aisw/converters/backend/ir_to_dlc.py", line 151, in save DlcTranslations.apply_method_to_all_ops(BackendTranslationBase.ADD_OP_TO_BACKEND, graph, self) File "/opt/source/easyedge-snpe/lib/python/qti/aisw/converters/common/converter_ir/translation.py", line 71, in apply_method_to_all_ops self.apply_method_to_op(node.op.type, method_name, node, graph, *args, **kwargs) File "/opt/source/easyedge-snpe/lib/python/qti/aisw/converters/common/converter_ir/translation.py", line 51, in apply_method_to_op return translation.apply_method(method_name, *args, **kwargs) File "/opt/source/easyedge-snpe/lib/python/qti/aisw/converters/common/converter_ir/translation.py", line 18, in apply_method return self.indexed_methods[method_name](*args, **kwargs) File "/opt/source/easyedge-snpe/lib/python/qti/aisw/converters/backend/ir_to_dlc.py", line 271, in add_op_to_backend node.op.padding_size_strategy = adjust_padding_strategy(self, node, input_w, input_h, kernel_w, kernel_h) File "/opt/source/easyedge-snpe/lib/python/qti/aisw/converters/backend/snpe_translation_utils.py", line 61, in adjust_padding_strategy raise ValueError("Unsupported Asymmetric padding values {} for node {}".format(pads_list, node.op.name)) ValueError: Unsupported Asymmetric padding values [3, 3, 2, 2] for node pnasnet0_pnasunit5_dwsbranch0_nasdwsconv0_dwsconv0_conv0

 

but i think asymmetric padding between height and width is very common, especially in OCR or SEG model

Will SNPE support onnx asymmetric padding(only in height and width, not in begin and end) in the future?

  • Up0
  • Down0
weihuan
Join Date: 12 Apr 20
Posts: 270
Posted: Sun, 2022-09-04 06:19

Dear custuomer,
 

What's your convertsion and quatization commands used? Started from SM8350 also known as 888 external, SNPE has supported to symmetric default. But asymmetric aslo support on SNPE internal already.

But we're still recommending to quantize with symmetric for your training model.

BR.

Wei

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