trainru
(To be removed) Unsupervised random order weight/bias training
trainru 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 = 'trainru'
[net,tr] = train(net,...)
Description
trainru is not called directly. Instead it is called by
train for networks whose net.trainFcn property
is set to 'trainru', thus:
net.trainFcn = 'trainru' sets the network
trainFcn property.
[net,tr] = train(net,...) trains the network with
trainru.
trainru trains a network with weight and bias learning rules with
incremental updates after each presentation of an input. Inputs are presented in random
order.
Training occurs according to trainru training parameters, shown
here with their default values:
net.trainParam.epochs |
| Maximum number of epochs to train |
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
To prepare a custom network to be trained with trainru,
Set
net.trainFcnto'trainru'. This setsnet.trainParamtotrainru’s default parameters.Set each
net.inputWeights{i,j}.learnFcnto a learning function.Set each
net.layerWeights{i,j}.learnFcnto a learning function.Set each
net.biases{i}.learnFcnto 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.trainParamproperties to desired values.Set weight and bias learning parameters to desired values.
Call
train.
Algorithms
For each epoch, all training vectors (or sequences) are each presented once in a different random order, with the network and 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.The maximum amount of
timeis exceeded.
Version History
Introduced in R2010bSee Also
Time Series
Modeler | fitrnet (Statistics and Machine Learning Toolbox) | fitcnet (Statistics and Machine Learning Toolbox) | trainnet | trainingOptions | dlnetwork