[TensorRT] ERROR:Parameter check failed at :engine.cpp::enqueue::451,condition:batchSize>0&&batchsize <=mEngine.getMaxBatchSize()

when i want to use tensorrt to accelerate my model,i meet this error.Now,i have finished the first step of converting the pytorch to ONNX ,andd this error has happened in the second step that is convert the ONNX to tensorrt.i have kooked up a lot of information ,but i can not solve the problem.

the whole error information :

[TensorRT] ERROR: Parameter check failed at: engine.cpp::enqueue::451, condition: batchSize > 0 && batchSize <= mEngine.getMaxBatchSize()

Did you find the solution to it?
I am also facing the same issue…

Did you check the network engine input ?
I had similar error when network input was wrong.

this means you forgot to set maxbatchsize or what you set is larget than mEngine.getMaxBatchSize()
IBuilder* builder = createInferBuilder(gLogger.getTRTLogger());

1 Like