The Encog Project

org.encog.neural.networks.training.propagation
Class Propagation

java.lang.Object
  extended by org.encog.neural.networks.training.BasicTraining
      extended by org.encog.neural.networks.training.propagation.Propagation
All Implemented Interfaces:
Train
Direct Known Subclasses:
Backpropagation, ManhattanPropagation, ResilientPropagation, ScaledConjugateGradient

public abstract class Propagation
extends BasicTraining

Implements basic functionality that is needed by each of the propagation methods. The specifics of each of the propagation methods is implemented inside of the PropagationMethod interface implementors.

Author:
jheaton

Constructor Summary
Propagation(BasicNetwork network, NeuralDataSet training)
          Construct a propagation object.
 
Method Summary
 boolean canContinue()
           
 BasicNetwork getNetwork()
          Get the current best network from the training.
 int getNumThreads()
           
 boolean isValidResume(TrainingContinuation state)
          Determine if this specified training continuation object is valid for this training method.
 void iteration()
          Perform one training iteration.
 TrainingContinuation pause()
          Pause the training to continue later.
abstract  void performIteration(CalculateGradient prop, double[] weights)
          Perform an iteration.
 void resume(TrainingContinuation state)
          Resume training.
 void setNumThreads(int numThreads)
          Set the number of threads.
 
Methods inherited from class org.encog.neural.networks.training.BasicTraining
addStrategy, finishTraining, getError, getStrategies, getTraining, postIteration, preIteration, setError, setTraining
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Propagation

public Propagation(BasicNetwork network,
                   NeuralDataSet training)
Construct a propagation object.

Parameters:
network - The network.
training - The training set.
Method Detail

canContinue

public boolean canContinue()
Returns:
True if this training can be continued.

getNetwork

public BasicNetwork getNetwork()
Description copied from interface: Train
Get the current best network from the training.

Returns:
The network.

getNumThreads

public int getNumThreads()
Returns:
The number of threads.

isValidResume

public boolean isValidResume(TrainingContinuation state)
Determine if this specified training continuation object is valid for this training method.

Parameters:
state - The training continuation object to check.
Returns:
True if the continuation object is valid.

iteration

public void iteration()
Perform one training iteration.


pause

public TrainingContinuation pause()
Pause the training to continue later.

Returns:
A training continuation object.

performIteration

public abstract void performIteration(CalculateGradient prop,
                                      double[] weights)
Perform an iteration. This is implemented for each of the propagation method types.

Parameters:
prop - The gradients.
weights - The weights.

resume

public void resume(TrainingContinuation state)
Resume training.

Parameters:
state - The training continuation object to use to continue.

setNumThreads

public void setNumThreads(int numThreads)
Set the number of threads.

Parameters:
numThreads - The number of threads.

The Encog Project