Open KaiqiJinWow opened 5 years ago
weight_decay and momentum are optional arguments of the optim. Try to add them in the below code (in the jpynb file). opt = torch.optim.SGD(net.params(),lr=hyperparameters["lr"]) --> opt = torch.optim.SGD(net.params(),lr=hyperparameters["lr"], weight_decay=1e-4, momentum=0.9)
I try to add weight_decay and momentum in the update_params() function in the model.py but I cannot figure it out yet. Could anybody give me some advice? Thank you in advance.