Skip to content

Commit

Permalink
Fix the bug that tensorRT batch_size does not take effect (ultralytic…
Browse files Browse the repository at this point in the history
…s#11672)

* Fix the bug that tensorRT batch_size does not take effect

Signed-off-by: wuhongsheng <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: wuhongsheng <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
wuhongsheng and pre-commit-ci[bot] committed Jun 7, 2023
1 parent 89c3040 commit a199480
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ def run(
if f == '-':
w = weights # PyTorch format
else:
w = export.run(weights=weights, imgsz=[imgsz], include=[f], device=device, half=half)[-1] # all others
w = export.run(weights=weights,
imgsz=[imgsz],
include=[f],
batch_size=batch_size,
device=device,
half=half)[-1] # all others
assert suffix in str(w), 'export failed'

# Validate
Expand Down

0 comments on commit a199480

Please sign in to comment.