Skip to content

Commit

Permalink
Added nesterov momentum
Browse files Browse the repository at this point in the history
  • Loading branch information
ancestor-mithril committed Nov 7, 2024
1 parent 7076751 commit 4335623
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def init_optimizer(args, parameters) -> Optimizer:
"lr": args.lr,
"momentum": momentum,
"weight_decay": weight_decay,
"nesterov": True,
}
if torch.torch_version.TorchVersion(torch.__version__) >= "2.3.0":
if args.device != "cpu":
Expand Down

0 comments on commit 4335623

Please sign in to comment.