hpc
hpc copied to clipboard
[cosmoflow] [logging] Weight decay and l2 regularization differs by a factor of 2
Weight decay and l2 regularization differs by a factor of 2. (Refs) I think the value of Weight Decay output in the following line should be "l2 * 2".
https://github.com/mlcommons/hpc/blob/b796e7aec0339b8a2d33e7af3c875ebe74f038aa/cosmoflow/models/cosmoflow.py#L52
Refs
-
Boris's blog, "weight decay vs L2 regularization" https://bbabenko.github.io/weight-decay/
-
Keras/issues/2717 "Is it the same adding weight decay to all the layers (including input and output layer) than adding the weight decay term to the cost function? #2717" https://github.com/keras-team/keras/issues/2717#issuecomment-522033163