org.joone.engine.extenders
Class LearnerExtender
- java.lang.Object
-
- org.joone.engine.extenders.LearnerExtender
-
- Direct Known Subclasses:
- DeltaRuleExtender, GradientExtender, UpdateWeightExtender
public abstract class LearnerExtender extends java.lang.ObjectThis abstract class describes the methods that any learner extender must provide.
-
-
Constructor Summary
Constructors Constructor and Description LearnerExtender()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description booleanisEnabled()Checks if the learner extender is enabled.abstract voidpostBiasUpdate(double[] currentGradientOuts)Gives extenders a change to do some post-computing after the biases are updated.abstract voidpostWeightUpdate(double[] currentPattern, double[] currentInps)Gives extenders a change to do some post-computing after the weights are updated.abstract voidpreBiasUpdate(double[] currentGradientOuts)Gives extenders a change to do some pre-computing before the biases are updated.abstract voidpreWeightUpdate(double[] currentPattern, double[] currentInps)Gives extenders a change to do some pre-computing before the weights are updated.voidsetEnabled(boolean aMode)Sets the mode of this extender.voidsetLearner(ExtendableLearner aLearner)Sets the learner.
-
-
-
Method Detail
-
setLearner
public void setLearner(ExtendableLearner aLearner)
Sets the learner. This way the extender has a reference to the learner.- Parameters:
aLearner- the learner this object is extending.
-
isEnabled
public boolean isEnabled()
Checks if the learner extender is enabled.- Returns:
- true if the extender is enabled, false otherwise.
-
setEnabled
public void setEnabled(boolean aMode)
Sets the mode of this extender.- Parameters:
aMode- true for enabled, false for disabled.
-
preBiasUpdate
public abstract void preBiasUpdate(double[] currentGradientOuts)
Gives extenders a change to do some pre-computing before the biases are updated.- Parameters:
currentGradientOuts- the back propagated gradients.
-
postBiasUpdate
public abstract void postBiasUpdate(double[] currentGradientOuts)
Gives extenders a change to do some post-computing after the biases are updated.- Parameters:
currentGradientOuts- the back propagated gradients.
-
preWeightUpdate
public abstract void preWeightUpdate(double[] currentPattern, double[] currentInps)Gives extenders a change to do some pre-computing before the weights are updated.- Parameters:
currentPattern- the back propagated gradients.currentInps- the forwarded input.
-
postWeightUpdate
public abstract void postWeightUpdate(double[] currentPattern, double[] currentInps)Gives extenders a change to do some post-computing after the weights are updated.- Parameters:
currentPattern- the back propagated gradients.currentInps- the forwarded input.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG