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
I find that it was because of nn.pixelshuffle.
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?