trainbu
(To be removed) Batch unsupervised weight/bias training
trainbu 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 = 'trainbu'
[net,tr] = train(net,...)
Description
trainbu trains a network with weight and bias learning rules with
batch updates. Weights and biases updates occur at the end of an entire pass through the
input data.
trainbu is not called directly. Instead the
train function calls it for networks whose
NET.trainFcn property is set to 'trainbu',
thus:
net.trainFcn = 'trainbu' sets the network
trainFcn property.
[net,tr] = train(net,...) trains the network with
trainbu.
Training occurs according to trainbu training parameters, shown
here with the following default values:
net.trainParam.epochs | 1000 | Maximum number of epochs to train |
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 |
Validation and test vectors have no impact on training for this function, but act as independent measures of network generalization.
Network Use
You can create a standard network that uses trainbu by calling
selforgmap. To prepare a custom network to be trained with
trainbu:
Set
NET.trainFcnto'trainbu'. (This option setsNET.trainParamtotrainbudefault 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.
See selforgmap for training examples.
Algorithms
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 is met:
The maximum number of
epochs(repetitions) is reached.Performance is minimized to the
goal.The maximum amount of
timeis exceeded.Validation performance (validation error) has increased more than
max_failtimes since the last time it decreased (when using validation).
Version History
Introduced in R2010bSee Also
Time Series
Modeler | fitrnet (Statistics and Machine Learning Toolbox) | fitcnet (Statistics and Machine Learning Toolbox) | trainnet | trainingOptions | dlnetwork