Neural Network Toolbox | Search  Help Desk |
trainwb | See Also |
By-weight-&-bias 1-vector-at-a-time training function
[net,tr] = trainwb(net,Pd,Tl,Ai,Q,TS,VV)
info = trainwb(code)
trainwb
is a network training function that updates weight and bias values according to Levenberg-Marquardt optimization.
trainwb(
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.goal 0
Performance goal
net.trainParam.max_fail 5
Maximum validation failures
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)
[]
, it must be a structure of validation vectors,
VV.PD -
Validation delayed inputs.
VV.Tl -
Validation layer targets.
VV.Ai -
Validation initial input conditions.
VV.TS -
Validation time steps.
max_fail
epochs in a row.
trainwb(code)
returns useful information for each code
string:
You can create a standard network that uses trainwb
with newp
or newlin
.
To prepare a custom network to be trained with trainwb
:
..trainFcn
to 'trainwb
'. (This will set net.trainParam
to trainwb
'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
.
newp
and newlin
for training examples.
Each weight and bias updates according to its learning function after each epoch (one pass through the entire set of input vectors).
Training stops when any of these conditions occur:
.epochs
(repetitions) is reached.
.goal
.
.time
has been exceeded.
.max_fail
times since the
last time it decreased (when using validation).
newp
,
newlin
,
train