From 0dbb21bc68698404c7a0823693ba397530021134 Mon Sep 17 00:00:00 2001 From: liutuo Date: Thu, 20 Jun 2019 19:29:10 +0800 Subject: [PATCH] fix the bug of validate layers's log --- tools/device.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/device.py b/tools/device.py index ca21c285..57061969 100644 --- a/tools/device.py +++ b/tools/device.py @@ -713,16 +713,16 @@ class DeviceWrapper: ) for runtime in runtime_list: device_type = parse_device_type(runtime) + log_dir = mace_model_dir + "/" + runtime + if os.path.exists(log_dir): + sh.rm('-rf', log_dir) + os.makedirs(log_dir) for output_config in output_configs: self.run_model(flags, configs, target_abi, model_name, output_config, runtime, tuning) if flags.validate: log_file = "" if flags.layers != "-1": - log_dir = mace_model_dir + "/" + runtime - if os.path.exists(log_dir): - sh.rm('-rf', log_dir) - os.makedirs(log_dir) log_file = log_dir + "/log.csv" model_file_path, weight_file_path = \ get_model_files( -- GitLab