|
|
|
|
|
|
|
|
f = str(file).replace('.pt', '-int8_edgetpu.tflite') # Edge TPU model |
|
|
f = str(file).replace('.pt', '-int8_edgetpu.tflite') # Edge TPU model |
|
|
f_tfl = str(file).replace('.pt', '-int8.tflite') # TFLite 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) |
|
|
subprocess.run(cmd, shell=True, check=True) |
|
|
|
|
|
|
|
|
LOGGER.info(f'{prefix} export success, saved as {f} ({file_size(f):.1f} MB)') |
|
|
LOGGER.info(f'{prefix} export success, saved as {f} ({file_size(f):.1f} MB)') |