tensorflowdeep-learningqualcommsnpe

SNPE Model conversion: Syntax for model input with 0 dimensions


I'm using SNPE to convert a NN model from .tflite format to .dlc. Usually models I have converted easily work as it's a simple matter of specifying the dimensions of each input as parameters to the snpe-tflite-to-dlc tool featured in SNPE. However, my current model features 2 inputs which are of no dimensions at all. See this screenshot from my Netron visualisation of the model:

2 inputs without any dimensions

The documentation concerning this tool does not mention what sort of input should be specified in this case, only giving an example of multiple inputs. My command currently looks like this:

snpe-tflite-to-dlc \
        --input_network facebook_denoiser.tflite \
        --input_dim audio "1,1,100000" \
        --input_dim arg0 "" \
        --input_dim arg1 "" \
        --input_dim arg2 "390,1,768" \
        --input_dim arg3 "1,768" \
        --input_dim arg4 "1,768" \
        --input_dim arg5 "390,1,768" 

Running it does not work, and I have tried various other similiar ways such as omitting arg0 and arg1 completely, or setting them as 0, but the tool just throws a NoneType error (which usually means that the parameters were not correctly formatted).

Does anyone know how to convert such a model?


Solution

  • Hi thanks for your question.

    In order to do this you will need to hardcode the input node and its dimensions. Currently, SNPE does not support dynamic input.