l2 norm
dongfang91 opened this issue · 3 comments
dongfang91 commented
Is there any code showing the usage of l2 norm?
Eric-Wallace commented
Just add the l2 regularization to the optimizer line in train.py
dongfang91 commented
Can you be more specific?
optimizer = torch.optim.Adam(model.parameters(), lr=args.lr)
This line? As an argument?
dongfang91 commented
Already figured it out, it's the weight_decay in optimizer. Thanks!