smart_optimizer() improved reporting (#8887)
Update smart_optimizer() weight_decay reporting
This commit is contained in:
1 parent
030586a31c
commit
20f1b7ea08
2 files changed
+4
-5
No files matched your search
@@ -152,7 +152,6 @@ def train(hyp, opt, device, callbacks): # hyp is path/to/hyp.yaml or hyp dictio
|
||||
nbs = 64 # nominal batch size
|
||||
accumulate = max(round(nbs / batch_size), 1) # accumulate loss before optimizing
|
||||
hyp['weight_decay'] *= batch_size * accumulate / nbs # scale weight_decay
|
||||
LOGGER.info(f"Scaled weight_decay = {hyp['weight_decay']}")
|
||||
optimizer = smart_optimizer(model, opt.optimizer, hyp['lr0'], hyp['momentum'], hyp['weight_decay'])
|
||||
|
||||
# Scheduler
|
||||
|
||||
Reference in new issue
Block a user