Fixing minor multi-streaming issues with TensoRT engine (#6504)
* Update batch-size in model.warmup() + indentation for logging inference results * These changes are in response to PR comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
079b36d72b
commit
8fcdf3b60b
2 files changed
+5
-5
No files matched your search
@@ -162,7 +162,7 @@ def run(data,
|
||||
|
||||
# Dataloader
|
||||
if not training:
|
||||
model.warmup(imgsz=(1, 3, imgsz, imgsz), half=half) # warmup
|
||||
model.warmup(imgsz=(1 if pt else batch_size, 3, imgsz, imgsz), half=half) # warmup
|
||||
pad = 0.0 if task == 'speed' else 0.5
|
||||
task = task if task in ('train', 'val', 'test') else 'val' # path to train/val/test images
|
||||
dataloader = create_dataloader(data[task], imgsz, batch_size, stride, single_cls, pad=pad, rect=pt,
|
||||
|
||||
Reference in new issue
Block a user