Package crino :: Module criterion :: Class NegativeLogLikelihood
[hide private]
[frames] | no frames]

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 > )

Instance Methods [hide private]
 
__init__(self, outputs, targets)
Constructs a new NegativeLogLikelihood criterion.
source code
 
prepare(self)
Computes the Negative Log Likelihood symbolic expression.
source code
Instance Variables [hide private]

Inherited from Criterion: expression, outputs, targets

Method Details [hide private]

__init__(self, outputs, targets)
(Constructor)

source code 
Constructs a new NegativeLogLikelihood criterion.
Parameters:
Overrides: Criterion.__init__

prepare(self)

source code 
Computes the Negative Log Likelihood symbolic expression.
Overrides: Criterion.prepare