Package crino :: Module module :: Class Softmax
[hide private]
[frames] | no frames]

Class Softmax

source code


A Softmax activation module computes its outputs with the non-linear softmax function, that can be defined as softmax(x) = [exp(xi) ⁄ ni = 1exp(xi)]ni = 1, with x = [x1, x2, …, xn] ∈ ℝn.
Instance Methods [hide private]
 
__init__(self, nOutputs, nInputs=None)
Constructs a new Softmax activation module.
source code
 
prepareOutput(self)
Computes the softmax function  = [exp(xi) ⁄ ni = 1exp(xi)]ni = 1
source code

Inherited from Activation: prepareParams

Inherited from Standalone: prepareGeometry

Inherited from Module: criterionFunction, forward, forwardFunction, holdFunction, linkInputs, linkModule, prepare, prepareBackup, restoreFunction, save, trainFunction

Instance Variables [hide private]

Inherited from Module: backupParams, inputs, nInputs, nOutputs, outputs, params, prepared

Method Details [hide private]

__init__(self, nOutputs, nInputs=None)
(Constructor)

source code 
Constructs a new Softmax activation module.
Parameters:
  • nOutputs (int) - The outputs size.
  • nInputs (int) - The inputs size.
Overrides: Module.__init__

prepareOutput(self)

source code 
Computes the softmax function  = [exp(xi) ⁄ ni = 1exp(xi)]ni = 1
Overrides: Module.prepareOutput