From 03a1f58e03f2211dccc221a755b98d2de9ea09ae Mon Sep 17 00:00:00 2001 From: Laughing <61612323+Laughing-q@users.noreply.github.com> Date: Wed, 16 Oct 2024 20:24:28 +0800 Subject: [PATCH] `ultralytics 8.3.14` update TensorRT `dynamic` inference (#16953) Co-authored-by: Glenn Jocher --- ultralytics/__init__.py | 2 +- ultralytics/cfg/__init__.py | 1 - ultralytics/nn/autobackend.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index 06ee07e308..99cfc59deb 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.3.13" +__version__ = "8.3.14" import os diff --git a/ultralytics/cfg/__init__.py b/ultralytics/cfg/__init__.py index c8d8f44f02..e73610aaf5 100644 --- a/ultralytics/cfg/__init__.py +++ b/ultralytics/cfg/__init__.py @@ -1,6 +1,5 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -import contextlib import shutil import subprocess import sys diff --git a/ultralytics/nn/autobackend.py b/ultralytics/nn/autobackend.py index 12977f0184..3d9fbe24a7 100644 --- a/ultralytics/nn/autobackend.py +++ b/ultralytics/nn/autobackend.py @@ -501,7 +501,7 @@ class AutoBackend(nn.Module): # TensorRT elif self.engine: - if self.dynamic or im.shape != self.bindings["images"].shape: + if self.dynamic and im.shape != self.bindings["images"].shape: if self.is_trt10: self.context.set_input_shape("images", im.shape) self.bindings["images"] = self.bindings["images"]._replace(shape=im.shape)