目录
在python代码里,在调用engine推理前做这样的设置即可:
yolov7 tensorrt预测时报错:
[09/09/2022-01:29:24] [TRT] [E] 3: [executionContext.cpp::nvinfer1::rt::ShapeMachineContext::resolveSlots::1480] Error Code 3: API Usage Error (Parameter check failed at: executionContext.cpp::nvinfer1::rt::ShapeMachineContext::resolveSlots::1480, condition: allInputDimensionsSpecified(routine)
)
[09/09/2022-01:29:24] [TRT] [E] 9: [executionContext.cpp::nvinfer1::rt::ExecutionContext::executeInternal::527] Error Code 9: Internal Error (Could not resolve slots: )
下面是作者报的错:
调用具体动态维度的模型engine时如果没有指定维度,会导致报类似这样的错误:
[TRT] Parameter check failed at: engine.cpp::resolveslots::1227, con