Fix model re-fuse() in inference loops (#466)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com>
This commit is contained in:
Glenn Jocher
2023-01-18 20:32:36 +01:00
committed by GitHub
parent cc3c774bde
commit a86218b767
22 changed files with 135 additions and 66 deletions

View File

@ -140,10 +140,13 @@ class ClassificationTrainer(BaseTrainer):
def train(cfg):
cfg.model = cfg.model or "yolov8n-cls.pt" # or "resnet18"
cfg.data = cfg.data or "mnist160" # or yolo.ClassificationDataset("mnist")
cfg.lr0 = 0.1
cfg.weight_decay = 5e-5
cfg.label_smoothing = 0.1
cfg.warmup_epochs = 0.0
# Reproduce ImageNet results
# cfg.lr0 = 0.1
# cfg.weight_decay = 5e-5
# cfg.label_smoothing = 0.1
# cfg.warmup_epochs = 0.0
cfg.device = cfg.device if cfg.device is not None else ''
# trainer = ClassificationTrainer(cfg)
# trainer.train()