Fix DDP classify train imgsz (#2897)

This commit is contained in:
Glenn Jocher 2023-05-29 19:23:19 +02:00 committed by GitHub
parent a2bb42dfe9
commit 0d47d11393
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)