org.encog.neural.networks.training.propagation.back
public class Backpropagation extends Propagation implements Momentum, LearningRate
Modifier and Type | Field and Description |
---|---|
static String |
LAST_DELTA
The resume key for backpropagation.
|
gradients, network
Constructor and Description |
---|
Backpropagation(ContainsFlat network,
MLDataSet training)
Create a class to train using backpropagation.
|
Backpropagation(ContainsFlat network,
MLDataSet training,
double theLearnRate,
double theMomentum) |
Modifier and Type | Method and Description |
---|---|
boolean |
canContinue() |
double[] |
getLastDelta() |
double |
getLearningRate() |
double |
getMomentum() |
void |
initOthers()
Perform training method specific init.
|
boolean |
isValidResume(TrainingContinuation state)
Determine if the specified continuation object is valid to resume with.
|
TrainingContinuation |
pause()
Pause the training.
|
void |
resume(TrainingContinuation state)
Resume training.
|
void |
setLearningRate(double rate)
Set the learning rate, this is value is essentially a percent.
|
void |
setMomentum(double m)
Set the momentum for training.
|
double |
updateWeight(double[] gradients,
double[] lastGradient,
int index)
Update a weight.
|
calculateGradients, finishTraining, fixFlatSpot, getBatchSize, getCurrentFlatNetwork, getLastGradient, getMethod, getThreadCount, iteration, iteration, learn, learnLimited, report, rollIteration, setBatchSize, setErrorFunction, setThreadCount
addStrategy, getError, getImplementationType, getIteration, getStrategies, getTraining, isTrainingDone, postIteration, preIteration, setError, setIteration, setTraining
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addStrategy, getError, getImplementationType, getIteration, getStrategies, getTraining, isTrainingDone, setError, setIteration
public static final String LAST_DELTA
public Backpropagation(ContainsFlat network, MLDataSet training)
network
- The network that is to be trained.training
- The training data to be used for backpropagation.public Backpropagation(ContainsFlat network, MLDataSet training, double theLearnRate, double theMomentum)
network
- The network that is to be trainedtraining
- The training settheLearnRate
- The rate at which the weight matrix will be adjusted based on
learning.theMomentum
- The influence that previous iteration's training deltas will
have on the current iteration.public boolean canContinue()
canContinue
in interface MLTrain
public double[] getLastDelta()
public double getLearningRate()
getLearningRate
in interface LearningRate
public double getMomentum()
getMomentum
in interface Momentum
public boolean isValidResume(TrainingContinuation state)
state
- The continuation object to check.public TrainingContinuation pause()
public void resume(TrainingContinuation state)
public void setLearningRate(double rate)
setLearningRate
in interface LearningRate
rate
- The learning rate.public void setMomentum(double m)
setMomentum
in interface Momentum
m
- The momentum.public double updateWeight(double[] gradients, double[] lastGradient, int index)
updateWeight
in class Propagation
gradients
- The gradients.lastGradient
- The last gradients.index
- The index.public void initOthers()
initOthers
in class Propagation
Copyright © 2014. All Rights Reserved.