Facing error while trying to convert onnx model using TensorRT Optimisation tool

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
1.9.1.10844
other

Host Machine Version
native Ubuntu 18.04
other
I had keras Tensorflow model, converted to onnx model using Tf2onnx package.
Then with this converted onnx model trying to optimize using TensorRT optimization tool.
Getting following error
Network has dynamic or shape inputs, but no optimization profile has been defined
Attaching the required files(Onnx model, error screenshot, error log file, Tensorflow keras model).
Mar3_3.onnx (1.9 MB)


log.txt (26.1 KB)
DMS.h5 (5.7 MB)

Dear @alksainath.medam,
Before trying out tensort optimization tool, I would recommend to test your model using trtexec tool.

I tested the model using trtexec tool.
Getting the following error.
Dynamic dimensions required for input conv2d_input
Attaching the error screenshot and log file.


log.txt (26.1 KB)

Dear @alksainath.medam,
Could you check with --minShapes=conv2d_input:1x145x145x3 --optShapes=conv2d_input:16x145x145x3 --maxShapes=conv2d_input:256x256x256x3 --shapes=conv2d_input:5x145x145x3 instead of --minShapes=conv2d_input:0:1x145x145x3 --optShapes=conv2d_input:0:16x145x145x3 --maxShapes=conv2d_input:0:256x256x256x3 --shapes=conv2d_input:0:5x145x145x3

I had tried as u suggested, getting “Cuda failure: out of memory”
I had shared my model previously and sharing again.
Can, you try from your side and share the optimized model along with process/steps.
Sharing the log file and screenshot along with model.


log.txt (94.3 KB)

Mar3_3.onnx (1.9 MB)

I had tried, as u suggested getting “Cuda failure: out of memory”
After trying in high-end system got following error.
“Required optimization profile is invalid”
Attaching the screenshots.


Could you please provide the log of running mar3_3.onnx instead of DMS.onnx?

Both are same models I just changed the name.