Package mdp :: Class CheckpointSaveFunction
[hide private]
[frames] | no frames]

Class CheckpointSaveFunction


This checkpoint function saves the node in pickle format. The pickle dump can be done either before the training phase is finished or right after that. In this way, it is for example possible to reload it in successive sessions and continue the training.
Instance Methods [hide private]
 
__call__(self, node)
Execute the checkpoint function.
 
__init__(self, filename, stop_training=0, binary=1, protocol=2)
CheckpointSaveFunction constructor.

Inherited from unreachable.newobject: __long__, __native__, __nonzero__, __unicode__, next

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__call__(self, node)
(Call operator)

 

Execute the checkpoint function.

This is the method that is going to be called at the checkpoint. Overwrite it to match your needs.

Overrides: CheckpointFunction.__call__
(inherited documentation)

__init__(self, filename, stop_training=0, binary=1, protocol=2)
(Constructor)

 
CheckpointSaveFunction constructor.

'filename'      -- the name of the pickle dump file.
'stop_training' -- if set to 0 the pickle dump is done before
                   closing the training phase
                   if set to 1 the training phase is closed and then
                   the node is dumped
'binary'        -- sets binary mode for opening the file.
                   When using a protocol higher than 0, make sure
                   the file is opened in binary mode.
'protocol'      -- is the 'protocol' argument for the pickle dump
                   (see Pickle documentation for details)

Overrides: object.__init__