Home | Trees | Indices | Help |
|
---|
|
Base class for parallel trainable MDP nodes. With the fork method new node instances are created which can then be trained. With the join method the trained instances are then merged back into a single node instance. This class defines default methods which raise a TrainingPhaseNotParallelException exception.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|||
Inherited from Node | |||
---|---|---|---|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
|
|||
|
|||
Inherited from Node | |||
---|---|---|---|
|
|||
|
|
|||
extension_name =
hash(x) |
|
|||
Inherited from |
|||
Inherited from Node | |||
---|---|---|---|
_train_seq List of tuples: |
|||
dtype dtype |
|||
input_dim Input dimensions |
|||
output_dim Output dimensions |
|||
supported_dtypes Supported dtypes |
|
Default implementation of _fork. It uses introspection to determine the init kwargs and tries to fill them with attributes. These kwargs are then used to instanciate self.__class__ to create the fork instance. So you can use this method if all the required keys are also public attributes or have a single underscore in front. There are two reasons why this method does not simply replace _fork of ParallelExtensionNode (plus removing Node from the inheritance list): - If a node is not parallelized _fork raises an exception, as do nodes which can not fork due to some other reasons. Without this bahavior of _fork we would have to check with hasattr first if fork is present, adding more complexity at other places (mostly in container nodes). - This is a safeguard forcing users to think a little instead of relying on the inherited (but possibly incompatible) default implementation. |
Hook method for forking with default implementation. Overwrite this method for nodes that can be parallelized. You can use _default_fork, if that is compatible with your node class, typically the hard part is the joining. |
Hook method for joining, to be overridden. |
Helper method to join two CovarianceMatrix instances. cov -- Instance of CovarianceMatrix, to which the forked_cov instance is aded in-place. |
Return a new instance of this node class for remote training. This is a template method, the actual forking should be implemented in _fork. The forked node should be a ParallelNode of the same class as well, thus allowing recursive forking and joining. |
Absorb the trained node from a fork into this parent node. This is a template method, the actual joining should be implemented in _join. |
Return True if node requires a fork / join even during execution. The default output is False, overwrite this method if required. Note that the same fork and join methods are used as during training, so the distinction must be implemented in the custom _fork and _join methods. |
|
extension_namehash(x)
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Mar 8 12:39:48 2016 | http://epydoc.sourceforge.net |