Forums - AssertionError: ERROR_RESHAPE_BATCH_UNSUPPORTED

3 posts / 0 new
Last post
AssertionError: ERROR_RESHAPE_BATCH_UNSUPPORTED
gunsuk.seo
Join Date: 11 May 20
Posts: 8
Posted: Tue, 2020-05-19 04:27

Hi, I'm trying to convert onnx to dlc format.

model link : https://github.com/onnx/models/tree/master/vision/super_resolution/sub_p...

And I use setup_inceptionv3.py, but failed. (actually the error comes from during snpe-onnx-to-dlc)

Traceback (most recent call last):
  File "/home/gunsukseo/Downloads/snpe-1.38.0.2034/lib/python/snpe/converters/onnx/onnx_to_ir.py", line 136, in ir_optimize
    op_graph_optimizations.apply_graph_optimizations(graph, self.disable_batchnorm_folding, **kwargs)
  File "/home/gunsukseo/Downloads/snpe-1.38.0.2034/lib/python/snpe/converters/common/converter_ir/op_graph_optimizations.py", line 91, in apply_graph_optimizations
    OptimizationTranslations.apply_method_to_all_ops(AXES_TO_SPATIAL_FIRST_ORDER, graph)
  File "/home/gunsukseo/Downloads/snpe-1.38.0.2034/lib/python/snpe/converters/common/converter_ir/translation.py", line 70, in apply_method_to_all_ops
    self.apply_method_to_op(node.op.type, method_name, node, graph, *args)
  File "/home/gunsukseo/Downloads/snpe-1.38.0.2034/lib/python/snpe/converters/common/converter_ir/translation.py", line 51, in apply_method_to_op
    return translation.apply_method(method_name, *args)
  File "/home/gunsukseo/Downloads/snpe-1.38.0.2034/lib/python/snpe/converters/common/converter_ir/translation.py", line 17, in apply_method
    return self.indexed_methods[method_name](*args)
  File "/home/gunsukseo/Downloads/snpe-1.38.0.2034/lib/python/snpe/converters/common/converter_ir/op_graph_optimizations.py", line 1063, in axes_to_spatial_first_order
    code_to_message.get_error_message("ERROR_RESHAPE_BATCH_UNSUPPORTED"))
  File "/home/gunsukseo/Downloads/snpe-1.38.0.2034/lib/python/snpe/converters/common/utils/snpe_converter_utils.py", line 133, in log_assert
    assert cond, msg.format(*args)
AssertionError: ERROR_RESHAPE_BATCH_UNSUPPORTED: SNPE does not support a batch dimension greater than 1 for reshape ops
2020-05-20 04:59:45,780 - 164 - ERROR - ERROR_RESHAPE_BATCH_UNSUPPORTED: SNPE does not support a batch dimension greater than 1 for reshape ops
INFO: Setup super_resolution completed.

I don't know why this happen, because the onnx model input shape is (batch=1, 1, 224, 224) , and output shape is (batch,1,672,672)

How to solve this problem? Thanks for the help..

My OS is Ubuntu 16.04, Python version is 3.5.

SNPE SDK version : 1.38.0.2034

  • Up0
  • Down0
gunsuk.seo
Join Date: 11 May 20
Posts: 8
Posted: Wed, 2020-05-20 01:34

I find that it was because of nn.pixelshuffle.

  • Up0
  • Down0
773577284
Join Date: 3 Jun 20
Posts: 1
Posted: Fri, 2020-06-12 01:08

I meet same error. it seems that onnx trans the nn,pixelshuffle to reshape ,permute ops and the size of reshape size has 6 dimensions, which cause the error. I also find a class named DlcPixelShuffleTranslation in $snpe/lib/python/qti/aisw/converters/backend/ir_to_dlc.py(SNPE SDK 1.39) Does anyone have a try?

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