org.joone.engine.extenders
Class OnlineModeExtender

java.lang.Object
  extended by org.joone.engine.extenders.LearnerExtender
      extended by org.joone.engine.extenders.UpdateWeightExtender
          extended by org.joone.engine.extenders.OnlineModeExtender

public class OnlineModeExtender
extends UpdateWeightExtender

This is the default weight updater (online). It stores the weights after each update.

Author:
Boris Jansen

Constructor Summary
OnlineModeExtender()
          Creates a new instance of OnlineExtender
 
Method Summary
 void postBiasUpdate(double[] currentGradientOuts)
          Gives extenders a change to do some post-computing after the biases are updated.
 void postWeightUpdate(double[] currentPattern, double[] currentInps)
          Gives extenders a change to do some post-computing after the weights are updated.
 void preBiasUpdate(double[] currentGradientOuts)
          Gives extenders a change to do some pre-computing before the biases are updated.
 void preWeightUpdate(double[] currentPattern, double[] currentInps)
          Gives extenders a change to do some pre-computing before the weights are updated.
 boolean storeWeightsBiases()
          Checks if the weights or biases will be stored this cycle.
 void updateBias(int j, double aDelta)
          Updates a bias with the calculated delta value.
 void updateWeight(int j, int k, double aDelta)
          Updates a weight with the calculated delta value.
 
Methods inherited from class org.joone.engine.extenders.LearnerExtender
getLearner, isEnabled, setEnabled, setLearner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnlineModeExtender

public OnlineModeExtender()
Creates a new instance of OnlineExtender

Method Detail

postBiasUpdate

public void postBiasUpdate(double[] currentGradientOuts)
Description copied from class: LearnerExtender
Gives extenders a change to do some post-computing after the biases are updated.

Specified by:
postBiasUpdate in class LearnerExtender
Parameters:
currentGradientOuts - the back propagated gradients.

postWeightUpdate

public void postWeightUpdate(double[] currentPattern,
                             double[] currentInps)
Description copied from class: LearnerExtender
Gives extenders a change to do some post-computing after the weights are updated.

Specified by:
postWeightUpdate in class LearnerExtender
Parameters:
currentPattern - the back propagated gradients.
currentInps - the forwarded input.

preBiasUpdate

public void preBiasUpdate(double[] currentGradientOuts)
Description copied from class: LearnerExtender
Gives extenders a change to do some pre-computing before the biases are updated.

Specified by:
preBiasUpdate in class LearnerExtender
Parameters:
currentGradientOuts - the back propagated gradients.

preWeightUpdate

public void preWeightUpdate(double[] currentPattern,
                            double[] currentInps)
Description copied from class: LearnerExtender
Gives extenders a change to do some pre-computing before the weights are updated.

Specified by:
preWeightUpdate in class LearnerExtender
Parameters:
currentPattern - the back propagated gradients.
currentInps - the forwarded input.

updateBias

public void updateBias(int j,
                       double aDelta)
Description copied from class: UpdateWeightExtender
Updates a bias with the calculated delta value.

Specified by:
updateBias in class UpdateWeightExtender
Parameters:
j - the index of the bias to update.
aDelta - the calculated delta value.

updateWeight

public void updateWeight(int j,
                         int k,
                         double aDelta)
Description copied from class: UpdateWeightExtender
Updates a weight with the calculated delta value.

Specified by:
updateWeight in class UpdateWeightExtender
Parameters:
j - the input index of the weight to update.
k - the output index of the weight to update.
aDelta - the calculated delta value.

storeWeightsBiases

public boolean storeWeightsBiases()
Description copied from class: UpdateWeightExtender
Checks if the weights or biases will be stored this cycle.

Specified by:
storeWeightsBiases in class UpdateWeightExtender
Returns:
true if the weights or biases will be stored this cycle, false otherwise.


Submit Feedback to pmarrone@users.sourceforge.net