code-of-learn-deep-learning-with-pytorch icon indicating copy to clipboard operation
code-of-learn-deep-learning-with-pytorch copied to clipboard

权重衰减可以通过 torch.optim.lr_scheduler 的相关类完成,从而使权重衰减和训练逻辑分离

Open xiaoyuan0203 opened this issue 3 years ago • 0 comments

@L1aoXingyu

作者你好,非常感谢您的分享。这里我提出一点小小的意见。

权重衰减可以通过 torch.optim.lr_scheduler 的相关类如 ExponentialLR完成,从而使权重衰减和训练逻辑分离。作权重衰减相关介绍的时候可以这么来介绍(实际使用也是这么使用比较广泛)。

https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate

xiaoyuan0203 avatar Jun 19 '22 04:06 xiaoyuan0203