Description
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?
Thanks
Environment
Relevant Files
Steps To Reproduce
Hi,
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
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 GitHub - NVIDIA-AI-IOT/torch2trt: An easy to use PyTorch to TensorRT converter to create the engine.
Hi,
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.
https://pytorch.org/docs/stable/onnx.html
<!--- SPDX-License-Identifier: Apache-2.0 -->
## Operator Schemas
*This file is automatically generated from the
[def files](/onnx/defs) via [this script](/onnx/defs/gen_doc.py).
Do not modify directly and instead edit operator definitions.*
For an operator input/output's differentiability, it can be differentiable,
non-differentiable, or undefined. If a variable's differentiability
is not specified, that variable has undefined differentiability.
### ai.onnx (default)
|**Operator**|**Since version**|
|-|-|
|<a href="#Abs">Abs</a>|<a href="Changelog.md#Abs-13">13</a>, <a href="Changelog.md#Abs-6">6</a>, <a href="Changelog.md#Abs-1">1</a>|
|<a href="#Acos">Acos</a>|<a href="Changelog.md#Acos-7">7</a>|
|<a href="#Acosh">Acosh</a>|<a href="Changelog.md#Acosh-9">9</a>|
|<a href="#Add">Add</a>|<a href="Changelog.md#Add-14">14</a>, <a href="Changelog.md#Add-13">13</a>, <a href="Changelog.md#Add-7">7</a>, <a href="Changelog.md#Add-6">6</a>, <a href="Changelog.md#Add-1">1</a>|
|<a href="#And">And</a>|<a href="Changelog.md#And-7">7</a>, <a href="Changelog.md#And-1">1</a>|
|<a href="#ArgMax">ArgMax</a>|<a href="Changelog.md#ArgMax-13">13</a>, <a href="Changelog.md#ArgMax-12">12</a>, <a href="Changelog.md#ArgMax-11">11</a>, <a href="Changelog.md#ArgMax-1">1</a>|
|<a href="#ArgMin">ArgMin</a>|<a href="Changelog.md#ArgMin-13">13</a>, <a href="Changelog.md#ArgMin-12">12</a>, <a href="Changelog.md#ArgMin-11">11</a>, <a href="Changelog.md#ArgMin-1">1</a>|
This file has been truncated. show original
Thanks
OK … torch2trt seems better for me .
Thanks for answer. have a nice day.