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

Class Sequential

source code

Known Subclasses:

A Sequential module computes its outputs sequentially, i.e. each outputs of its submodules is linked to the inputs of the following module. The number of submodules in the sequence can be chosen arbitrarily, but the inputs and outputs sizes must be the same throughout the sequence.

../images/sequential.png
Instance Methods [hide private]
 
__init__(self, mods=[], nInputs=None)
Constructs a new Sequential container.
source code
 
prepareGeometry(self)
Sets the same inputs and outputs size for all submodules, and prepare their internal geometry.
source code
 
prepareParams(self)
Initializes the params of the submodules.
source code
 
prepareOutput(self)
Computes sequentially the symbolic outputs of the module.
source code

Inherited from Container: add

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

Instance Variables [hide private]

Inherited from Container: modules

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

Method Details [hide private]

__init__(self, mods=[], nInputs=None)
(Constructor)

source code 
Constructs a new Sequential container.
Parameters:
  • mods (list) - A list of submodules to add to the sequence. They will be linked in the same order as provided.
  • nInputs (int) - The inputs size of the sequence (and of all the submodules).
Overrides: Module.__init__

prepareGeometry(self)

source code 
Sets the same inputs and outputs size for all submodules, and prepare their internal geometry.
Overrides: Module.prepareGeometry

prepareParams(self)

source code 
Initializes the params of the submodules. The Sequential module params will include the params of its submodules .
Overrides: Module.prepareParams

prepareOutput(self)

source code 
Computes sequentially the symbolic outputs of the module.
Overrides: Module.prepareOutput