Melody-Zhou / tensorRT_Pro-YOLOv8

This repository is based on shouxieai/tensorRT_Pro, with adjustments to support YOLOv8.
MIT License
240 stars 40 forks source link

make yolo报错 #19

Open Yi-hash1 opened 7 months ago

Yi-hash1 commented 7 months ago

image NVInfer: 3: [executionContext.cpp::setBindingDimensions::944] Error Code 3: API Usage Error (Parameter check failed at: runtime/api/executionContext.cpp::setBindingDimensions::944, condition: profileMaxDims.d[i] >= dimensions.d[i]. Supplied binding dimension [2,3,640,640] for bindings[0] exceed min ~ max range at index 0, um dimension in profile is 1, minimum dimension in profile is 1, but supplied dimension is 2.

Yi-hash1 commented 7 months ago

求大佬解答下,用的静态batch

Melody-Zhou commented 7 months ago

image NVInfer: 3: [executionContext.cpp::setBindingDimensions::944] Error Code 3: API Usage Error (Parameter check failed at: runtime/api/executionContext.cpp::setBindingDimensions::944, condition: profileMaxDims.d[i] >= dimensions.d[i]. Supplied binding dimension [2,3,640,640] for bindings[0] exceed min ~ max range at index 0, um dimension in profile is 1, minimum dimension in profile is 1, but supplied dimension is 2.

似乎是你的 batch size 2 超过了允许的最大值 1,你可以尝试下:

  1. app_yolo.cpp 中 test_batch_size 设置为你导出的静态 onnx 的batch,具体可参考:app_yolo.cpp#L140
  2. 使用动态 batch 的 onnx 模型