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

Class Concat

source code


A Concat module computes its outputs in parallel, i.e. it subdivides its inputs in n ∈ ℕ parts of fixed sizes. The sum of the submodules inputs sizes must equal the total inputs size of the Concat.

../images/concat.png
Instance Methods [hide private]
 
__init__(self, mods=[], nInputs=None)
Constructs a new Concat container.
source code
 
prepareGeometry(self)
Sets the outputs size for the Concat, and prepare the submodules internal geometry.
source code
 
prepareParams(self)
Initializes the params of the submodules.
source code
 
prepareOutput(self)
Computes the symbolic outputs of all the submodules, and concatenate them to get the complete outputs.
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 Concat container.
Parameters:
  • mods (list) - A list of submodules to add to the concat. Each one will receive a part of the inputs.
  • nInputs (int) - The inputs size of the concat.
Overrides: Module.__init__

prepareGeometry(self)

source code 
Sets the outputs size for the Concat, and prepare the submodules 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 the symbolic outputs of all the submodules, and concatenate them to get the complete outputs.
Overrides: Module.prepareOutput