Next: PatRandom.m
Up: Base Modules
Previous: RndWtsBs.m
Module to control the whole training process. Refer to
Section 3.1 for general functioning explanation. Called by the
network definition file (see Section 4.1.1).
Calls to modules DefaultUndefs.m, LoadIO.m and RndWtsBs.m
are issued. Then the following variables are initialized,
- msErrDenom
- The denominator to normalize the mean
square error calculation (see Base/ConvChk.m in Section 4.1.10).
Calculated by taking the product of the dimensions of the desired output matrix,
desiredOutsL2. The product is taken by the function prod
and the dimensions of the matrix is taken by the function size ,
refer to Section 5.
- sampleOnes
- An array consisting of 1's of length
nOfSamples , used in training calculations to expand
a column vector to be a matrix containing identical columns. The function ones
is used in order to create it (refer to Section 5).
- queue
- Array consisting of 1's of length queueSize ,
used in running queue mean error calculation (see ConvChk.m in Section 4.1.10).
- qIndex
- Variable used in running queue mean error calculation
(see ConvChk.m in Section 4.1.10), initialized to 1.
- twopi
- Constant variable whose value is initialized to
.
- msErr
- Mean square error value (see ConvChk.m in Section
4.1.10), initialized to 0.
- actFunc , actFuncD , actFuncD2
- The
variables holding the names of the functions to use for the activation function,
its first and second derivatives , respectively. They are
set to the name of one of the functions given in Section 4.1.9.3,
by looking at the value of the user defined variable unitType (see
Section 4.1.1).
- trainFunc
- Holds the name of the function to call to do training
for one epoch. It is set to the name of one of the functions given in Section
4.1.9, by looking at the value of the user defined variable
trainType (see Section 4.1.1).
MainLoop.m proceeds into a loop of training, until the maximum number
of epochs are reached or the network has converged. Inside the loop, an optional
call to function PatRandom.m (see Section 4.1.6) is
issued, then the value of the variable trainFunc is evaluated (see
command eval in Section 5), thus resulting
in a call to the training function for one epoch. Finally, ConvChk.m
(see Section 4.1.10) is called to check for convergence and return
true if so.
Once outside the loop, information about the success of the training and the
accompanying details are displayed. The training is elapsed by the calls to
the functions tic and toc (see Section 5),
and average time per epoch is displayed. DrawResults.m (see Sections
3.1.3.1 and 4.1.11) is called to
draw a graph of the error profile during training.
Next: PatRandom.m
Up: Base Modules
Previous: RndWtsBs.m
Cengiz Gunay
2000-06-25