peal.training.criterions.l1_criterion

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

Mean absolute value over all parameters of model (L1 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.