How to convert .pth into .onxx in the docker container with Pytorch to build a TensorRT engine?

Hello.I need to create TensorRT engine for the pose-detection programm, which i am going to run in the docker container.

As far, as i am concerned, i need to convert .pth file into .onxx file, first, to build TensroRT engine,but, unfortunatelly, i dont know how to do that. So, could you give me, please, a step by step instruction about conversion of the .pth file to .onxx file ?

Do I understand correctly, that i need to convert .pth file into .onxx file in the docker container, if i going to use the engine in the container ?

Hi,

You can find an example in the below PyTorch document:

https://pytorch.org/docs/stable/onnx_dynamo.html

ONNX is a portable model format so you can convert the .pth into .onnx on other platforms as well.
But the TensorRT engine is hardware-dependent, please do the .onnx to .trt conversion on Jeteson directly.

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.