Skip to content

Commit 9bdd784

Browse files
TensorRT FP16 export with dynamic=True (ultralytics#7870)
1 parent 51fb3d6 commit 9bdd784

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ultralytics/engine/exporter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def __call__(self, model=None):
227227
y = None
228228
for _ in range(2):
229229
y = model(im) # dry runs
230-
if self.args.half and (engine or onnx) and self.device.type != "cpu":
230+
if self.args.half and onnx and self.device.type != "cpu":
231231
im, model = im.half(), model.half() # to FP16
232232

233233
# Filter warnings

0 commit comments

Comments
 (0)