Closed hyt1407 closed 4 years ago
Hi hyt1407,
Thanks for reaching out!
To use larger batch sizes you need to specify the max_batch_size
parameter. For example,
model_trt = torch2trt(..., max_batch_size=2)
Apologies for any confusion in the API, the batch size is not inferred from the input data shape.
Please let me know if this helps or you run into issues.
Best, John
@jaybdub It works! Thank you!
Hi, when the batch size of x is greater than 1, the effective output cannot be obtained.
x is continuous:
However, the output of model and model_trt is still inconsistent
Confusingly, when I set the size of x to (1,3,112,112), the output of the two models differs little.
TensorRT 6.0.1, CUDA Version 10.0, CuDNN 7.6, PyTorch 1.4.0 Thank you