From 5592a3abdf8bfb289a1715df578d63660d0f6076 Mon Sep 17 00:00:00 2001 From: triple Mu Date: Wed, 12 Jul 2023 19:22:56 +0800 Subject: [PATCH] Fix PNNX debug filename (#3687) Co-authored-by: Glenn Jocher --- ultralytics/yolo/engine/exporter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ultralytics/yolo/engine/exporter.py b/ultralytics/yolo/engine/exporter.py index 2d99b4a..8401bbf 100644 --- a/ultralytics/yolo/engine/exporter.py +++ b/ultralytics/yolo/engine/exporter.py @@ -445,8 +445,8 @@ class Exporter: f.mkdir(exist_ok=True) # make ncnn_model directory LOGGER.info(f"{prefix} running '{' '.join(cmd)}'") subprocess.run(cmd, check=True) - for f in 'debug.bin', 'debug.param', 'debug2.bin', 'debug2.param': # remove debug files - Path(f).unlink(missing_ok=True) + for f_debug in 'debug.bin', 'debug.param', 'debug2.bin', 'debug2.param': # remove debug files + Path(f_debug).unlink(missing_ok=True) yaml_save(f / 'metadata.yaml', self.metadata) # add metadata.yaml return str(f), None