Cyclical order weight/bias training
net.trainFcn = 'trainc'
[net,tr] = train(net,...)
trainc
is not called directly. Instead it is called by
train
for networks whose net.trainFcn
property is set to
'trainc'
, thus:
net.trainFcn = 'trainc'
sets the network trainFcn
property.
[net,tr] = train(net,...)
trains the network with
trainc
.
trainc
trains a network with weight and bias learning rules with
incremental updates after each presentation of an input. Inputs are presented in cyclic
order.
Training occurs according to trainc
training parameters, shown here with
their default values:
net.trainParam.epochs | 1000 | Maximum number of epochs to train |
net.trainParam.goal | 0 | Performance goal |
net.trainParam.max_fail | 6 | Maximum validation failures |
net.trainParam.show | 25 | Epochs between displays ( |
net.trainParam.showCommandLine | false | Generate command-line output |
net.trainParam.showWindow | true | Show training GUI |
net.trainParam.time | inf | Maximum time to train in seconds |
You can create a standard network that uses trainc
by calling
competlayer
. To prepare a custom network to be trained with
trainc
,
Set net.trainFcn
to 'trainc'
.
This sets net.trainParam
to trainc
’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 train the network,
Set net.trainParam
properties to desired
values.
Set weight and bias learning parameters to desired values.
Call train
.
See perceptron
for training examples.
For each epoch, each vector (or sequence) is presented in order to the network, with the weight and bias values updated accordingly after each individual presentation.
Training stops when any of these conditions is met:
The maximum number of epochs
(repetitions) is reached.
Performance is minimized to the goal
.
The maximum amount of time
is exceeded.