mirror of
https://github.com/ultralytics/ultralytics.git
synced 2025-09-15 15:48:41 +08:00
Reduce EdgeTPU to 3 compiler steps (#16880)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
54d8801dfb
commit
1c4d788aa1
@ -960,7 +960,15 @@ class Exporter:
|
||||
LOGGER.info(f"\n{prefix} starting export with Edge TPU compiler {ver}...")
|
||||
f = str(tflite_model).replace(".tflite", "_edgetpu.tflite") # Edge TPU model
|
||||
|
||||
cmd = f'edgetpu_compiler -s -d -k 10 --out_dir "{Path(f).parent}" "{tflite_model}"'
|
||||
cmd = (
|
||||
"edgetpu_compiler "
|
||||
f'--out_dir "{Path(f).parent}" '
|
||||
"--show_operations "
|
||||
"--search_delegate "
|
||||
"--delegate_search_step 3 "
|
||||
"--timeout_sec 180 "
|
||||
f'"{tflite_model}"'
|
||||
)
|
||||
LOGGER.info(f"{prefix} running '{cmd}'")
|
||||
subprocess.run(cmd, shell=True)
|
||||
self._add_tflite_metadata(f)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user