shouxieai / tensorRT_Pro

C++ library based on tensorrt integration
MIT License
2.62k stars 549 forks source link

NVInfer: The getMaxBatchSize() function should not be used with an engine built from a network created with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag. This function will always return 1. #209

Closed 843124 closed 10 months ago

843124 commented 11 months ago

2 大佬你好,帮忙看看什么问题

scteam1994 commented 11 months ago

getMaxBatchSize()在tensorrt8.4以后版本废弃了,不过正常情况会返回1。你这个问题不是这个警告造成的,你可能是模型转换过程出的错,也可能是getMaxBatchSize()异常返回了0.先查一下onnx模型输入维度对不对吧。