Forums - Problems with PixelShuffle layer, TF Lite vs. Pytorch models

2 posts / 0 new
Last post
Problems with PixelShuffle layer, TF Lite vs. Pytorch models
manuel.k
Join Date: 27 Feb 23
Posts: 15
Posted: Thu, 2023-07-06 08:29

Dear Qualcomm QNN team,


We are having problems converting and running models with a PixelShuffle layer through the QNN SDK and were wondering if you could offer any help or explanation:
- When trying to convert a model that uses the `torch.nn.PixelShuffle` layer, qnn-pytorch-converter faisl with the message `The following operators are not implemented: ['aten::pixel_unshuffle']`.
- Therefore, we have implemented our own PixelShuffle layer in Pytorch based on the Reshape on Permute operations. These models convert, but can only be run with qnn-net-run:
- qnn-net-run can execute these Pytorch models with self-made PixelShuffle layers, the Sample App and qnn-throughput-net-run fail with `model.addNode(QNN_OPCONFIG_VERSION_1, "permute_0", "qti.aisw", "Transpose", params_permute_0, 1, inputs_permute_0, 1, outputs_permute_0, 1 ) expected MODEL_NO_ERROR, got MODEL_GRAPH_ERROR`. Is there any reason for this?

Additionally, we have noticed that TensorFlow models with PixelShuffle layers (in this case called `tf.nn.depth_to_space`) can be executed by qnn-net-run, qnn-throughput-net-run and the sample app. Is there any reason why Pytorch and TF Lite models behave so differently?
We are on QNN version 2.8.
 
Any help is appreciated!
 
With best regards,
Manuel Kolmet

 

  • Up0
  • Down0
weihuan
Join Date: 12 Apr 20
Posts: 270
Posted: Sat, 2023-07-08 08:26

Dear developer,

Could you please help to try convert pytroch model to onnx format.

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.