org.joone.util
Class SnapshotRecorder

java.lang.Object
  extended by org.joone.util.MonitorPlugin
      extended by org.joone.util.SnapshotPlugin
          extended by org.joone.util.SnapshotRecorder
All Implemented Interfaces:
java.io.Serializable, java.util.EventListener, NeuralNetListener

public class SnapshotRecorder
extends SnapshotPlugin
implements java.io.Serializable

A SnapshotRecorder serves to create and record snapshots of a neural network in a file as a serie of serialized objects graphs. A new clone of the network is generated for each snapshot and only the core part (between the input-layer and the output-layer) is kept.

Author:
Olivier Hussenet
See Also:
Serialized Form

Field Summary
static java.lang.String JOONE_FORMAT
          The Joone snapshot format (NeuralNet serialized objects graph)
static java.lang.String VISAD_FORMAT
          The VisAD snapshot format (NeuralNetData serialized objects graph).
 
Constructor Summary
SnapshotRecorder()
           
 
Method Summary
protected  void doSnapshot()
          Generates a snapshot of the current state of the network,
protected  void doStart()
          Creates the output stream used to write snapshots.
protected  void doStop()
          Flush the output buffer and close the file.
 java.lang.String getFilename()
          Get the name of the file to which snapshots will be written.
 java.lang.String getFormat()
          Get the format used for snapshots.
protected  void manageStopError(Monitor mon, java.lang.String msgErr)
           
 void setFilename(java.lang.String name)
          Set the name of the file to which snapshots will be written.
 void setFormat(java.lang.String format)
          Set the format used for snapshots.
 
Methods inherited from class org.joone.util.SnapshotPlugin
manageCycle, manageError, manageStart, manageStop
 
Methods inherited from class org.joone.util.MonitorPlugin
cicleTerminated, errorChanged, getName, getNeuralNet, getRate, netStarted, netStopped, netStoppedError, setName, setNeuralNet, setRate, toBeManaged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JOONE_FORMAT

public static final java.lang.String JOONE_FORMAT
The Joone snapshot format (NeuralNet serialized objects graph)

See Also:
Constant Field Values

VISAD_FORMAT

public static final java.lang.String VISAD_FORMAT
The VisAD snapshot format (NeuralNetData serialized objects graph). Not yet implemented

See Also:
Constant Field Values
Constructor Detail

SnapshotRecorder

public SnapshotRecorder()
Method Detail

doStart

protected void doStart()
Creates the output stream used to write snapshots.

Specified by:
doStart in class SnapshotPlugin
Parameters:
net - the current neural network

doSnapshot

protected void doSnapshot()
Generates a snapshot of the current state of the network,

Specified by:
doSnapshot in class SnapshotPlugin
Parameters:
net - the current neural network

doStop

protected void doStop()
Flush the output buffer and close the file.

Specified by:
doStop in class SnapshotPlugin
Parameters:
net - the current neural network

setFilename

public void setFilename(java.lang.String name)
Set the name of the file to which snapshots will be written.

Parameters:
name - the new snapshots file name.

getFilename

public java.lang.String getFilename()
Get the name of the file to which snapshots will be written.

Returns:
the current snapshots file name.

getFormat

public java.lang.String getFormat()
Get the format used for snapshots.

Returns:
the current snapshots format

setFormat

public void setFormat(java.lang.String format)
Set the format used for snapshots. Legal values are: 'visad' or 'java'.

Parameters:
format - the new snapshots format

manageStopError

protected void manageStopError(Monitor mon,
                               java.lang.String msgErr)
Specified by:
manageStopError in class MonitorPlugin


Submit Feedback to pmarrone@users.sourceforge.net