Is it possible to save and load networkdefinition in different device?


I am working on deploy pytorch detection as tensorrt engine on tx2. It works fine on my Desktop. But installing pytorch and other dependency is not so easy (and not necessary).

I wonder that is it possible to feed the networkdefinition to Tx2 only. Then I can just build the engine with that definition?



Relevant Files

Steps To Reproduce


You can convert the Pytorch model to ONNX in your desktop and then pass the ONNX model to TX2 for further conversion to TRT engine.


Thanks for reply.
My model contain multiple custom layers(IPluginV2DynamicExt). I don’t know how to convert them to onnx. Is it possible to add custom layer to onnx that can used in tensorrt?
By the way, I use to create the engine.


Since you have TensorRT plugin implementation already. Best approach will be to use torch2trt to create the engine.

Alternate approach is to create ONNX model using torch2onnx and based on the supported ops in ONNX parser add a custom plugin if required to generate the TRT engine.


OK … torch2trt seems better for me .
Thanks for answer. have a nice day.