Dynamic shape onnx model

Description

I have an onnx model of dynamic shape which is converted from a keras model. When I was trying to convert onnx model to tensor engine following error occurred:
----- Parsing of ONNX model keras-recognize-model2.onnx is Done ----
[08/13/2020-08:05:25] [E] [TRT] Parameter check failed at: optimizationProfile.cpp::setDimensions::119, condition: std::all_of(dims.d, dims.d + dims.nbDims, (int x) { return x > 0; })
[08/13/2020-08:05:25] [E] [TRT] Parameter check failed at: optimizationProfile.cpp::setDimensions::119, condition: std::all_of(dims.d, dims.d + dims.nbDims, (int x) { return x > 0; })
[08/13/2020-08:05:25] [E] [TRT] Parameter check failed at: optimizationProfile.cpp::setDimensions::119, condition: std::all_of(dims.d, dims.d + dims.nbDims, (int x) { return x > 0; })
[08/13/2020-08:05:25] [E] [TRT] input_1: dynamic input is missing dimensions in profile 0.
[08/13/2020-08:05:25] [E] [TRT] Network validation failed.
[08/13/2020-08:05:25] [E] Engine creation failed
[08/13/2020-08:05:25] [E] Engine set up failed

Command I have used:
trtexec --onnx=keras-recognize-model2.onnx --verbose --explicitBatch --shapes=input_1:0:1x1x31x200

Environment

TensorRT Version: 7.1
CUDA Version: 10.2
Operating System + Version: Ubuntu 18.04
Python Version (if applicable): 3.6.9
** Docker contained used**: docker pull nvcr.io/nvidia/tensorrt:20.03-py3

Relevant Files

Here’s onnx model:

Steps To Reproduce

trtexec --onnx=keras-recognize-model2.onnx --verbose --explicitBatch --shapes=input_1:0:1x1x31x200

Hi @aaryan,
I tried your model and couldnt reproduce your issue, however getting Myelin Error in compileGraph which is a known issue, and will be fixed in future release.
Can you please recheck if you have shared the correct model or try running the below command on latest TRT release.
trtexec --onnx=keras-recognize-model2.onnx --verbose --explicitBatch --shapes=input_1:1x1x31x200

Thanks!

@AakankshaS I was deliberately running this model on this container [nvcr.io/nvidia/tensorrt:20.03-py3] so that I can run this model on jetson nano (which cannot be done using Cuda 11). Can you please check this model on this same docker container

Hi @aaryan,

There is an edit in the above command, where you have to give the correct input name, shapes=input_1:1x1x31x200.
However when I tried running your model with correct entries, i encountered the below error


The issue has been reported and fix will be available in future releases.
Please stay tuned.

Thanks!

1 Like