public class AdamTrainer extends BackpropTrainer
currentEpoch, epochs, learnRate, net, shuffle, stepMode, testData, trainingData, trainingSignalGenerator| Constructor and Description |
|---|
AdamTrainer()
Creates an Adam trainer with a learn rate of 0.001 and a batch size of 32.
|
| Modifier and Type | Method and Description |
|---|---|
protected double |
calcAdaptation(BrainPart part)
Calculates the Adam adaptation using estimated first and second moments of the gradient.
|
void |
fromXML(org.jdom2.Element element)
Reads attributes from XML.
|
double |
getBeta1()
Returns the value of beta1 used for the previous mean gradient.
|
double |
getBeta2()
Returns the value of beta2 used for the second moment of the gradient.
|
double |
getEpsilon()
Returns the fuzz factor used to avoid numerical problems.
|
protected void |
reset()
Resets bias correction for a fresh training procedure.
|
void |
setBeta1(double beta1)
Sets the value of the weight of the current gradient.
|
void |
setBeta2(double beta2)
Sets the value of the weight of the second moment of the gradient.
|
void |
setEpsilon(double epsilon)
Returns the fuzz factor used to avoid numerical problems.
|
org.jdom2.Element |
toXML(org.jdom2.Element element)
Writes specific elements to XML tree.
|
endPattern, endTrain, train, train, trainclone, endBatch, getBatchSize, getEpochs, getLearnRate, getNetwork, getRank, getTestData, getTrainingData, getTrainingSignalGenerator, getWinningNeuron, setBatchSize, setEpochs, setLearnRate, setNetwork, setShuffle, setStepMode, setTestData, setTrainingData, setTrainingSignalGenerator, test, test, toString, train, trainPattern, updateLinks, updateNeuronspublic AdamTrainer()
protected void reset()
reset in class BackpropTrainerprotected double calcAdaptation(BrainPart part)
calcAdaptation in class BackpropTrainerpart - the brain part to be adaptedpublic double getBeta1()
public void setBeta1(double beta1)
beta1 - weight value (in unit interval)public double getBeta2()
public void setBeta2(double beta2)
beta2 - weight value (in unit interval)public double getEpsilon()
public void setEpsilon(double epsilon)
epsilon - the fuzz factor valuepublic org.jdom2.Element toXML(org.jdom2.Element element)