Skip to content

Commit

Permalink
Fix EdgeTPU output directory (ultralytics#7399)
Browse files Browse the repository at this point in the history
* Fix EdgeTPU output directory

Outputs to same directory as --weights

* Update export.py
  • Loading branch information
glenn-jocher committed Apr 12, 2022
1 parent 5c4587f commit b1c1aaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion export.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def export_edgetpu(keras_model, im, file, prefix=colorstr('Edge TPU:')):
f = str(file).replace('.pt', '-int8_edgetpu.tflite') # Edge TPU model
f_tfl = str(file).replace('.pt', '-int8.tflite') # TFLite model

cmd = f"edgetpu_compiler -s {f_tfl}"
cmd = f"edgetpu_compiler -s -o {file.parent} {f_tfl}"
subprocess.run(cmd, shell=True, check=True)

LOGGER.info(f'{prefix} export success, saved as {f} ({file_size(f):.1f} MB)')
Expand Down

0 comments on commit b1c1aaf

Please sign in to comment.