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

Class CrossEntropy

source code


The cross-entropy criterion is well suited for targets vector that are normalized between 0 and 1, used along with a final Sigmoid activation module.

It has been experimentally demonstrated that an AutoEncoder trains faster with a cross-entropy criterion.

The cross-entropy loss can be written as follows :

LCE =  − 1 ⁄ N Nk = 1(ylog() + (1 − y)⋅log(1 − ))

Instance Methods [hide private]
 
__init__(self, outputs, targets)
Constructs a new CrossEntropy criterion.
source code
 
prepare(self)
Computes the cross-entropy 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 CrossEntropy criterion.
Parameters:
Overrides: Criterion.__init__

prepare(self)

source code 
Computes the cross-entropy symbolic expression.
Overrides: Criterion.prepare