| Neural Network Toolbox | Search  Help Desk |
| trainwb1 | See Also |
By-weight-and-bias network training function
[net,tr] = trainwb1(net,Pd,Tl,Ai,Q,TS,VV)
info = trainwb1(code)
trainwb1 is a network training function which updates each weight and bias according to its learning function. At each epoch trainwb1 randomly chooses just one input vector (or sequence) to present to the network.
trainwb1(net,Pd,Tl,Ai,Q,TS,VV) takes these inputs,
Ai - Initial input delay conditions.
VV - Either empty matrix [] or structure of validation vectors.
TR - Training record of various values over each epoch:
trainwb1's training parameters shown here with their default values:
net.trainParam.epochs 100 Maximum number of epochs to train
net.trainParam.show 25 Epochs between showing progress
net.trainParam.time inf Maximum time to train in seconds
Pd - No x Ni x TS cell array, each element P{i,j,ts} is a Dij x Q matrix.
Tl - Nl x TS cell array, each element P{i,ts} is a Vi x Q matrix.
Ai - Nl x LD cell array, each element Ai{i,k} is an Si x Q matrix.
Dij = Ri * length(net.inputWeights{i,j}.delays)
trainwb1 does not implement validation or test vectors, so arguments VV and TV are ignored.
trainwb1(code) returns useful information for each code string:
You can create a standard network that uses trainwb1 with newc or newsom.
To prepare a custom network to be trained with trainwb1:
..trainFcn to 'trainwb1'. (This will set net.trainParam to
trainwb1's default parameters.)
.net.inputWeights{i,j}.learnFcn to a learning function. Set each
net.layerWeights{i,j}.learnFcn to a learning function. Set each
net.biases{i}.learnFcn to a learning function. (Weight and bias learning
parameters will automatically be set to default values for the given learning
function.)
..trainParam properties to desired values.
..train.
newc and newsom for training examples.
For each epoch a vector (or sequence) is chosen randomly and presented to the network and then the weight and bias values are updated accordingly.
Training stops when any of these conditions are met:
.epochs (repetitions) is reached.
.time has been exceeded.
newp, newlin, train