peal.training.criterions.l2_criterion

peal.training.criterions.l2_criterion(model, pred, y, latent_code=None)[source]

Mean squared value over all parameters of model (L2 weight decay).

pred, y and latent_code are ignored; the sum is divided by the total number of weights so the value is comparable across architectures.