From 9f2b2a0b9d51e431b7a3684539b113fb534bba16 Mon Sep 17 00:00:00 2001 From: wuhongsheng <664116298@qq.com> Date: Wed, 7 Jun 2023 22:53:41 +0800 Subject: [PATCH 1/2] Fix the bug that tensorRT batch_size does not take effect Signed-off-by: wuhongsheng <664116298@qq.com> --- benchmarks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks.py b/benchmarks.py index fc3073965ab3..d6a768719cf8 100644 --- a/benchmarks.py +++ b/benchmarks.py @@ -76,7 +76,7 @@ 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 From 2e3942a5736b22a082da93c26503d6d2f068bd34 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 7 Jun 2023 14:55:38 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- benchmarks.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/benchmarks.py b/benchmarks.py index d6a768719cf8..b590ff63cb01 100644 --- a/benchmarks.py +++ b/benchmarks.py @@ -76,7 +76,12 @@ def run( if f == '-': w = weights # PyTorch format else: - w = export.run(weights=weights, imgsz=[imgsz], include=[f], batch_size=batch_size, 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