C++ Neural Networks and Fuzzy Logic
by Valluru B. Rao M&T Books, IDG Books Worldwide, Inc. ISBN: 1558515526 Pub Date: 06/01/95 |
Previous | Table of Contents | Next |
Operation
The first thing to do with your simulator is to train a network with an architecture you choose. You can select the number of layers and the number of hidden layers for your network. Keep in mind that the input and output layer sizes are dictated by the input patterns you are presenting to the network and the outputs you seek from the network. Once you decide on an architecture, perhaps a simple three-layer network with one hidden layer, you prepare training data for it and save the data in the training.dat file. After this you are ready to train. You provide the simulator with the following information:
The simulator then begins training and reports the current cycle number and the average error for each cycle. You should watch the error to see that it is on the whole decreasing with time. If it is not, you should restart the simulation, because this will start with a brand new set of random weights and give you another, possibly better, solution. Note that there will be legitimate periods where the error may increase for some time. Once the simulation is done you will see information about the number of cycles and patterns used, and the total and average error that resulted. The weights are saved in the weights.dat file. You can rename this file to use this particular state of the network later. You can infer the size and number of layers from the information in this file, as will be shown in the next section for the weights.dat file format. You can have a peek at the output.dat file to see the kind of training result you have achieved. To get a full-blown accounting of each pattern and the match to that pattern, copy the training file to the test file and delete the output information from it. You can then run Test mode to get a full list of all the input stimuli and responses in the output.dat file.
Summary of Files Used in the Backpropagation Simulator
Here is a list of the files for your reference, as well as what they are used for.
1 -0.199660 -0.859660 -0.339660 -0.25966 0.520340 1 0.292860 -0.487140 0.212860 -0.967140 -0.427140 1 0.542106 -0.177894 0.322106 -0.977894 0.562106 2 -0.175350 -0.835350 2 -0.330167 -0.250167 2 0.503317 0.283317 2 -0.477158 0.222842 2 -0.928322 -0.388322
for input vector: 0.400000 -0.400000 output vector is: 0.880095 expected output vector is: 0.900000
Previous | Table of Contents | Next |