TensorRT FP16 export with `dynamic=True` (#7870)

pull/7885/head
Yonghye Kwon 12 months ago committed by GitHub
parent 51fb3d607e
commit 9bdd784bcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      ultralytics/engine/exporter.py

@ -227,7 +227,7 @@ class Exporter:
y = None
for _ in range(2):
y = model(im) # dry runs
if self.args.half and (engine or onnx) and self.device.type != "cpu":
if self.args.half and onnx and self.device.type != "cpu":
im, model = im.half(), model.half() # to FP16
# Filter warnings

Loading…
Cancel
Save