henry000 commited on
Commit
42e909b
Β·
1 Parent(s): 8b3b3ef

πŸ› [Update] Momentum of the optimizer

Browse files
Files changed (1) hide show
  1. yolo/utils/model_utils.py +3 -3
yolo/utils/model_utils.py CHANGED
@@ -52,9 +52,9 @@ def create_optimizer(model: YOLO, optim_cfg: OptimizerConfig) -> Optimizer:
52
  conv_params = [p for name, p in model.named_parameters() if "weight" in name and "bn" not in name]
53
 
54
  model_parameters = [
55
- {"params": bias_params, "weight_decay": 0},
56
- {"params": conv_params},
57
- {"params": norm_params, "weight_decay": 0},
58
  ]
59
  optimizer = optimizer_class(model_parameters, **optim_cfg.args)
60
  # TODO: implement batch lr schedular when warm up
 
52
  conv_params = [p for name, p in model.named_parameters() if "weight" in name and "bn" not in name]
53
 
54
  model_parameters = [
55
+ {"params": bias_params, "momentum": 0.8, "weight_decay": 0},
56
+ {"params": conv_params, "momentum": 0.8},
57
+ {"params": norm_params, "momentum": 0.8, "weight_decay": 0},
58
  ]
59
  optimizer = optimizer_class(model_parameters, **optim_cfg.args)
60
  # TODO: implement batch lr schedular when warm up