Where can I find the regularization loss implementation


#1

Hello,

can you help me to find the regularization loss implementation in Pytorch source code ?

Thank you very much !


(Beenfrog) #2

The parameter: weight_decay in optim modules control the regularization.
For example the code in SGD


#3

Thank you very much. In fact, I also want to find where the regularization loss is calculated ? can you help me?