From 0d47d1139396496ab12ca004bead1021e0a4a6cf Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 29 May 2023 19:23:19 +0200 Subject: [PATCH] Fix DDP classify train `imgsz` (#2897) --- ultralytics/yolo/v8/classify/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ultralytics/yolo/v8/classify/train.py b/ultralytics/yolo/v8/classify/train.py index 6c8b657..b9996bc 100644 --- a/ultralytics/yolo/v8/classify/train.py +++ b/ultralytics/yolo/v8/classify/train.py @@ -19,7 +19,7 @@ class ClassificationTrainer(BaseTrainer): if overrides is None: overrides = {} overrides['task'] = 'classify' - if overrides.get('imgsz') is None: + if overrides.get('imgsz') is None and cfg['imgsz'] == DEFAULT_CFG.imgsz == 640: overrides['imgsz'] = 224 super().__init__(cfg, overrides, _callbacks)