Fix DLA export (#17765)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Lakshantha Dissanayake <lakshanthad@yahoo.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
pull/17779/head
Laughing 3 days ago committed by GitHub
parent cde7a9f5d7
commit e1adef7a1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      ultralytics/engine/exporter.py

@ -220,6 +220,7 @@ class Exporter:
self.args.device = "0"
if fmt == "engine" and "dla" in str(self.args.device): # convert int/list to str first
dla = self.args.device.split(":")[-1]
self.args.device = "0" # update device to "0"
assert dla in {"0", "1"}, f"Expected self.args.device='dla:0' or 'dla:1, but got {self.args.device}."
self.device = select_device("cpu" if self.args.device is None else self.args.device)

Loading…
Cancel
Save