Refactor Python code (#13448)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
6a234f3639
commit
1b26838def
22 changed files with 81 additions and 101 deletions
|
|
@ -209,11 +209,12 @@ class Exporter:
|
|||
if self.args.optimize:
|
||||
assert not ncnn, "optimize=True not compatible with format='ncnn', i.e. use optimize=False"
|
||||
assert self.device.type == "cpu", "optimize=True not compatible with cuda devices, i.e. use device='cpu'"
|
||||
if edgetpu and not LINUX:
|
||||
raise SystemError("Edge TPU export only supported on Linux. See https://coral.ai/docs/edgetpu/compiler/")
|
||||
elif edgetpu and self.args.batch != 1: # see github.com/ultralytics/ultralytics/pull/13420
|
||||
LOGGER.warning("WARNING ⚠️ Edge TPU export requires batch size 1, setting batch=1.")
|
||||
self.args.batch = 1
|
||||
if edgetpu:
|
||||
if not LINUX:
|
||||
raise SystemError("Edge TPU export only supported on Linux. See https://coral.ai/docs/edgetpu/compiler")
|
||||
elif self.args.batch != 1: # see github.com/ultralytics/ultralytics/pull/13420
|
||||
LOGGER.warning("WARNING ⚠️ Edge TPU export requires batch size 1, setting batch=1.")
|
||||
self.args.batch = 1
|
||||
if isinstance(model, WorldModel):
|
||||
LOGGER.warning(
|
||||
"WARNING ⚠️ YOLOWorld (original version) export is not supported to any format.\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue