Allow OpenVINO export from CUDA (#14256)

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Antônio Martos Harres 2024-07-08 14:15:49 -03:00 committed by GitHub
parent b7902e2c8f
commit ec1b861392
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -454,7 +454,7 @@ class Exporter:
LOGGER.info(f"\n{prefix} starting export with openvino {ov.__version__}...")
assert TORCH_1_13, f"OpenVINO export requires torch>=1.13.0 but torch=={torch.__version__} is installed"
ov_model = ov.convert_model(
self.model.cpu(),
self.model,
input=None if self.args.dynamic else [self.im.shape],
example_input=self.im,
)