Skip to content

Commit

Permalink
Merge pull request #48 from ultralytics/master
Browse files Browse the repository at this point in the history
Fix the bug that tensorRT batch_size does not take effect (ultralytics#11672)
  • Loading branch information
NagatoYuki0943 authored Jun 9, 2023
2 parents 6a87357 + a199480 commit c8da105
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 c8da105

Please sign in to comment.