Neural Network Toolbox Previous page   Next Page
trainr

Random order incremental training with learning functions.

Syntax

[net,TR,Ac,El] = trainr(net,Pd,Tl,Ai,Q,TS,VV,TV)

info = trainr(code)

Description

trainr is not called directly. Instead it is called by train for networks whose net.trainFcn property is set to 'trainr'.

trainr trains a network with weight and bias learning rules with incremental updates after each presentation of an input. Inputs are presented in random order.

trainr(net,Pd,Tl,Ai,Q,TS,VV) takes these inputs,

and returns,

Training occurs according to trainr's training parameters shown here with their default values:

Dimensions for these variables are:

where

trainr does not implement validation or test vectors, so arguments VV and TV are ignored.

trainr(code) returns useful information for each code string:

Network Use

You can create a standard network that uses trainr by calling newc or newsom.

To prepare a custom network to be trained with trainr

  1. Set net.trainFcn to 'trainr'.
  2. Set each net.inputWeights{i,j}.learnFcn to a learning function.
  3. Set each net.layerWeights{i,j}.learnFcn to a learning function.
  4. Set each net.biases{i}.learnFcn to a learning function. (Weight and bias learning parameters will automatically be set to default values for the given learning function.)

To train the network

  1. Set net.trainParam properties to desired values.
  2. Set weight and bias learning parameters to desired values.
  3. Call train.

See newc and newsom for training examples.

Algorithm

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 are met:

See Also

newp, newlin, train


Previous page  trainoss trainrp Next page

© 1994-2005 The MathWorks, Inc.