| Neural Network Toolbox | |
| Provide feedback about this page |
Gradient descent with adaptive learning rate backpropagation
Syntax
Description
traingda is a network training function that updates weight and bias values according to gradient descent with adaptive learning rate.
traingda(net,TR,trainV,valV,testV) takes these inputs,
net |
Neural network |
TR |
Initial training record created by train |
trainV |
Training data created by train |
valV |
Validation data created by train |
testV |
Test data created by train |
net |
Trained network |
TR |
Training record of various values over each epoch |
Each argument trainV, valV, and testV is a structure of these fields:
Training occurs according to traingda's training parameters, shown here with their default values:
traingda('info') returns useful information about this function.
Network Use
You can create a standard network that uses traingda with newff, newcf, or newelm. To prepare a custom network to be trained with traingda,
net.trainFcn to 'traingda'. This sets net.trainParam to traingda's default parameters.
net.trainParam properties to desired values.
In either case, calling train with the resulting network trains the network with traingda.
See newff, newcf, and newelm for examples.
Algorithm
traingda can train any network as long as its weight, net input, and transfer functions have derivative functions.
Backpropagation is used to calculate derivatives of performance dperf with respect to the weight and bias variables X. Each variable is adjusted according to gradient descent:
At each epoch, if performance decreases toward the goal, then the learning rate is increased by the factor lr_inc. If performance increases by more than the factor max_perf_inc, the learning rate is adjusted by the factor lr_dec and the change that increased the performance is not made.
Training stops when any of these conditions occurs:
epochs (repetitions) is reached.
time is exceeded.
goal.
min_grad.
max_fail times since the last time it decreased (when using validation).
See Also
newff, newcf, traingd, traingdm, traingdx, trainlm
| Provide feedback about this page |
![]() | traingd | traingdm | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |