trains
(To be removed) Sequential order incremental training with learning functions
trains will be removed in a future release. For more information,
see Transition Legacy Neural Network Code to dlnetwork Workflows.
For advice on updating your code, see Version History.
Syntax
net.trainFcn = 'trains'
[net,tr] = train(net,...)
Description
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 |
Network Use
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.adaptFcnto'trains'. This setsnet.adaptParamtotrains’s default parameters.Set each
net.inputWeights{i,j}.learnFcnto a learning function. Set eachnet.layerWeights{i,j}.learnFcnto a learning function. Set eachnet.biases{i}.learnFcnto 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.
Algorithms
Each weight and bias is updated according to its learning function after each time step in the input sequence.
Version History
Introduced before R2006aSee Also
Time Series
Modeler | fitrnet (Statistics and Machine Learning Toolbox) | fitcnet (Statistics and Machine Learning Toolbox) | trainnet | trainingOptions | dlnetwork