| Neural Network Toolbox | |
| Provide feedback about this page |
Conjugate gradient backpropagation with Powell-Beale restarts
Syntax
Description
traincgb is a network training function that updates weight and bias values according to the conjugate gradient backpropagation with Powell-Beale restarts.
traincgb(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 traincgb's training parameters, shown here with their default values:
Parameters related to line search methods (not all used for all methods):
traincgb('info') returns useful information about this function.
Network Use
You can create a standard network that uses traincgb with newff, newcf, or newelm.
To prepare a custom network to be trained with traincgb,
net.trainFcn to 'traincgb'. This sets net.trainParam to traincgb's default parameters.
net.trainParam properties to desired values.
In either case, calling train with the resulting network trains the network with traincgb.
Examples
Here is a problem consisting of inputs p and targets t to be solved with a network.
A feed-forward network is created with a hidden layer of 2 neurons.
Here the network is trained and tested.
Algorithm
traincgb 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 perf with respect to the weight and bias variables X. Each variable is adjusted according to the following:
where dX is the search direction. The parameter a is selected to minimize the performance along the search direction. The line search function searchFcn is used to locate the minimum point. The first search direction is the negative of the gradient of performance. In succeeding iterations the search direction is computed from the new gradient and the previous search direction according to the formula
where gX is the gradient. The parameter Z can be computed in several different ways. The Powell-Beale variation of conjugate gradient is distinguished by two features. First, the algorithm uses a test to determine when to reset the search direction to the negative of the gradient. Second, the search direction is computed from the negative gradient, the previous search direction, and the last search direction before the previous reset. See Powell, Mathematical Programming, Vol. 12, 1977, pp. 241 to 254, for a more detailed discussion of the algorithm.
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).
Reference
Powell, M.J.D., "Restart procedures for the conjugate gradient method," Mathematical Programming, Vol. 12, 1977, pp. 241-254
See Also
newff, newcf, traingdm, traingda, traingdx, trainlm, traincgp, traincgf, traincgb, trainscg, trainoss, trainbfg
| Provide feedback about this page |
![]() | trainc | traincgf | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |