Class NegativeLogLikelihood
source code
The Negative Log Likelihood criterion is used in classification task.
It is meant to be connected to a Softmax Module as the last layer of the MLP.
The output size should be the same as the number of possible classes.
The target size should be the same as the number of possible classes, with value in between [0..1].
If not weighted, all 0 except 1 on the correct class.
The Negative Log Likelihood can be written as follows :
LNLL = − log( < ŷ, y > )
Computes the Negative Log Likelihood symbolic expression.
- Overrides:
Criterion.prepare
|