ultralytics 8.3.14 update TensorRT dynamic inference (#16953)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
75b6733678
commit
03a1f58e03
3 changed files with 2 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||||
|
|
||||||
__version__ = "8.3.13"
|
__version__ = "8.3.14"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||||
|
|
||||||
import contextlib
|
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
|
||||||
|
|
@ -501,7 +501,7 @@ class AutoBackend(nn.Module):
|
||||||
|
|
||||||
# TensorRT
|
# TensorRT
|
||||||
elif self.engine:
|
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:
|
if self.is_trt10:
|
||||||
self.context.set_input_shape("images", im.shape)
|
self.context.set_input_shape("images", im.shape)
|
||||||
self.bindings["images"] = self.bindings["images"]._replace(shape=im.shape)
|
self.bindings["images"] = self.bindings["images"]._replace(shape=im.shape)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue