Criterions are helpful to train a neural network. Given an input and a
target, they compute a gradient according to a given loss
function. AbsCriterion and
MSECriterion are perfect for regression problems, while
ClassNLLCriterion is the criterion of choice when
dealing with classification.
Criterions are serializable.