Tensor volume issue in onnx2tensorrt conversion process

Description

In onnx2tensorrt conversion process, I found tensor volume error message

Error Code 4: Internal Error ((Unnamed Layer* 394) [LoopOutput]_output: tensor volume exceeds (2^31)-1, dimensions are [2147483647,1,256]) While parsing node

As I heard TRT supports tensor at most 2G elements.
I want to know how much size(volume) I have to reduce for my model
How can I check the exceeded volume size?

Hi,
Request you to share the ONNX model and the script if not shared already so that we can assist you better.
Alongside you can try few things:

  1. validating your model with the below snippet

check_model.py

import sys
import onnx
filename = yourONNXmodel
model = onnx.load(filename)
onnx.checker.check_model(model).
2) Try running your model with trtexec command.

In case you are still facing issue, request you to share the trtexec “”–verbose"" log for further debugging
Thanks!