ultralytics 8.0.104 bug fixes and thop dependency removal (#2665)

Co-authored-by: Kevin Abraham <5976139+abraha2d@users.noreply.github.com>
Co-authored-by: Kevin Abraham <abraha2d@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com>
This commit is contained in:
Glenn Jocher
2023-05-17 02:26:01 +02:00
committed by GitHub
parent 7884098857
commit b1119d512e
13 changed files with 132 additions and 27 deletions

View File

@ -19,6 +19,8 @@ class ClassificationTrainer(BaseTrainer):
if overrides is None:
overrides = {}
overrides['task'] = 'classify'
if overrides.get('imgsz') is None:
overrides['imgsz'] = 224
super().__init__(cfg, overrides, _callbacks)
def set_model_attributes(self):
@ -40,10 +42,6 @@ class ClassificationTrainer(BaseTrainer):
for p in model.parameters():
p.requires_grad = True # for training
# Update defaults
if self.args.imgsz == 640:
self.args.imgsz = 224
return model
def setup_model(self):