Sequential order incremental training with learning functions
net.trainFcn = 'trains'
[net,tr] = train(net,...)
trains
is not called directly. Instead it is called by
train
for networks whose net.trainFcn
property is set to
'trains'
, thus:
net.trainFcn = 'trains'
sets the network trainFcn
property.
[net,tr] = train(net,...)
trains the network with
trains
.
trains
trains a network with weight and bias learning rules with
sequential updates. The sequence of inputs is presented to the network with updates occurring
after each time step.
This incremental training algorithm is commonly used for adaptive applications.
Training occurs according to trains
training parameters, shown here with
their default values:
net.trainParam.epochs |
| Maximum number of epochs to train |
net.trainParam.goal | 0 | Performance goal |
net.trainParam.show |
| Epochs between displays ( |
net.trainParam.showCommandLine |
| Generate command-line output |
net.trainParam.showWindow |
| Show training GUI |
net.trainParam.time |
| Maximum time to train in seconds |
You can create a standard network that uses trains
for adapting by
calling perceptron
or linearlayer
.
To prepare a custom network to adapt with trains
,
Set net.adaptFcn
to 'trains'
.
This sets net.adaptParam
to trains
’s default
parameters.
Set each 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 are automatically set to default values for the given learning
function.)
To allow the network to adapt,
Set weight and bias learning parameters to desired values.
Call adapt
.
See help perceptron
and help linearlayer
for adaption
examples.
Each weight and bias is updated according to its learning function after each time step in the input sequence.