I’m not familiar with Torch7 either. However, I think the L1Penalty refers to L1 regularization, not to the L1 loss function.
If we thinking about machine learning as learning some function, L1 regularization is used as a way to prevent overfitting by “smoothing” the function. In particular, it penalizes for the the overall magnitude of weights.
Here’s a good article on the difference between L1 regularization and L1 loss: http://www.chioka.in/differences-between-l1-and-l2-as-loss-function-and-regularization/ 53 .
Most of the pytorch optimizers include some form of L2 regularization.