Forums - Input dimensions ag

2 posts / 0 new
Last post
Input dimensions ag
aisraeli
Join Date: 13 Jan 22
Posts: 2
Posted: Thu, 2022-02-03 04:24

Hi,

I'm converting a model from keras to onnx to dlc. Since onnx support NCHW tensor shapes, it adds a transpose layer to match the different shapes. Therefore, my onnx model starts with input->transpose layer. In the DLC file i'm getting a corrupeted input shape of 1x224x3x224 (as defined by the onnx transpose layer) instead of 1x224x224x3.  

Conversion command:
snpe-onnx-to-dlc --input_network model.onnx -o model.dlc --input_dim input_1 "1,224,224,3"

 

How can I overcome this so expected input shape will be  1x224x224x3?

 

  • Up0
  • Down0
weihuan
Join Date: 12 Apr 20
Posts: 270
Posted: Thu, 2022-02-10 20:55

Dear customer,

You can convert the model wihtout specicif the --input_dim instead and converted as below directly.

snpe-onnx-to-dlc --input_network model.onnx -o model.dlc

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.