From 87f2ebacc5595ed1a4a72d8b486a4d249dcedf6a Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 12 Apr 2022 15:01:09 +0200 Subject: [PATCH 1/2] Fix EdgeTPU output directory Outputs to same directory as --weights --- export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/export.py b/export.py index e1e7207058b5..a2013aa74cf5 100644 --- a/export.py +++ b/export.py @@ -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)') From bb5029be555fd130fd5ef89887e418c9ad8a724f Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 12 Apr 2022 15:03:26 +0200 Subject: [PATCH 2/2] Update export.py --- export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/export.py b/export.py index a2013aa74cf5..00b98517cdf6 100644 --- a/export.py +++ b/export.py @@ -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 -o {file.parent} {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)')