Forums - Getting ERROR_TF_INPUT_NODE_SHAPE_DIMS_MISMATCH when converting pb to dlc

2 posts / 0 new
Last post
Getting ERROR_TF_INPUT_NODE_SHAPE_DIMS_MISMATCH when converting pb to dlc
shanesmiskol
Join Date: 19 May 19
Posts: 10
Posted: Mon, 2019-05-20 16:33

This is my first time using the SNPE, and I'm also new to TensorFlow and machine learning.

That said, I'm trying to convert a TensorFlow model built with keras to a dlc file. I already converted the h5 file to a frozen graph pb file successfully, however when I try to convert to dlc, it fails with the above error message, saying: One input shape must be specified for every input node. Not exactly sure what this means, but here's the command I'm using:

snpe-tensorflow-to-dlc --graph 15-min.pb --input_dim Adam/iterations "5" --out_node "training_6/Adam/Variable_41" --dlc test.dlc

My model is using 6 dense layers with the first layer being 32 nodes. The input takes an array of 5 numbers.

Thanks

Edit: I got a different error message now after figuring out the input node error. Now it says "list.remove(x): x not in list" in the file converter.py line 335 in _convert_input_layers

  • Up0
  • Down0
gesqdn-forum
Join Date: 4 Nov 18
Posts: 184
Posted: Mon, 2019-06-03 00:07

Hi,

As I observed the conversion command from this post:
-> snpe-tensorflow-to-dlc --graph 15-min.pb --input_dim Adam/iterations "5" --out_node "training_6/Adam/Variable_41" --dlc test.dlc
 
the argument --input_dim needs some following modification.
 
If we know the batch size (say n & n=2), --input_dim Adam/iterations "2,5"
If we are not aware of the batch size, --input_dim Adam/iterations "1,5"
 
But here, I see that, batch size is not mentioned and I faced same error by replicating at my end. This has resolved the issue for me, So please try this way.
  • 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.