How are you exporting your model to TensorRT?
Are you using a similar pipeline as this one:
PyTorch -> JIT -> ONNX -> TensorRT
or are you using the Python API of TensorRT?
I would like to reproduce this error, but I would need to know your work flow first.