A clear and concise description of the bug or issue.


TensorRT Version : ‘’
GPU Type :
Nvidia Driver Version :
CUDA Version : 11.4
CUDNN Version : 8.2
Operating System + Version : ubuntu 20.04
Python Version (if applicable) : 3.8.10
TensorFlow Version (if applicable) :
PyTorch Version (if applicable) : ‘1.8.1+cu102’
Baremetal or Container (if container which image + tag) :

Relevant Files

Can anyone give a sample code to implement quantize and dequantize nodes in the Tensor RT network using Python API.


Steps To Reproduce

Please include:

  • Exact steps/commands to build your repro
  • Exact steps/commands to run your repro
  • Full traceback of errors encountered


Hope following sample may help you.

Thank you.

Thanks for your reply.

The above example converts an ONNX model to TensorRT. Can you give an example where you convert the PyTorch QAT model to TensorRT without converting it into ONNX?


Hope following may help you.

Thank you.

These two documents don’t have any example code to implement for the direct QAT Torch model to TensorRT without converting it into ONNX.
Can anyone share the related documents with code samples.



Currently we do not have much examples apart from above and following links.

Thank you.