4.2.8 Running the Processes

To run a process, we first create a 'control panel' window for it. Select .processes / ControlPanel / Train in the Project window; this creates a control panel for running the TrainProcess. At this point, if you were to click on Run (don't do it now!), the network will proceed to run epochs, until either the stopping criterion is met or max epochs (shown in the max typein box) are completed.

Rather than start training right away, let's run through a test before any training is carried out. We can do this using the "Test" process, which is actually just another EpochProcess that is set up to run one epoch without learning. Select .processes / ControlPanel / Test in the Project window, then simply press Step. Now, you will see some action. First, assuming that act is selected in the NetView, you will see the activations of all of the units as the first pattern is processed. The input units are both off (0) in the first pattern, and should have the color associated with 0 in the color scale. The hidden and output units all have activations between about 0.4 and 0.6. The same information is displayed in the GridLogView. You should see the epoch number, the Event name, the sum-squared error for this event, and a display showing the activation of the hidden and output units for this event. If you press Step 3 more times you can step through the remaining test patterns. At the end of stepping you should have the results from all four cases visible in the GridLogView.

Now let's run 30 epochs of training and see what happens. To do this, just click on Step in the "Train" control panel, which is pre-set to run 30 epochs in each step (as indicated by the value of n in the control panel step field). When you do this, assuming that indeed the act button has been clicked in the NetView, you will see the state of activation in the network flicker through all four patterns thirty times. At the end of each epoch the total sum of squares will be displayed in the GraphLogView -- the results are pretty dismal at first, with a sum of sum-of-squares-error (sum_sum_se) oscillating a bit very close to 1.

After 30 epochs you can run through another test if you want, either stepping through the patterns one at a time as before with the Step button or running a complete test of all of the items with the Run button. If you hit Run the results will flicker by rather fast in the NetView but again all four cases will be logged in the GridLogView. You can see that the activations of the hidden and output units are very similar across all four cases.

You can proceed to taking successive steps of 30 epochs, then testing, if you like, or, if you prefer, you can simply let the learning process run to criterion, and then run a test only at that point. To do the latter, just hit Run in the "Train" control panel. You can click off the Display toggle in the NetView (near the upper left) --- this will speed things up a bit, even though the GraphLogView will still be adding new data after each epoch.

As with the example of learning XOR from the original PDP handbook, not much happens to the sum of sum-squared-error (sum_sum_se) until about epoch 160 or so. Now the error begins to drop, slowly at first, then faster... until at about 270 epochs the stopping criterion is reached, and the problem is solved. Hit Step in the "Test" control panel, to step through a test at this point. You should be able to see either in the NetView or in the GridLogView that the units that should be off are close to off (less than about .1) and the units that should be on are most of the way on (activation about .9).

If you would like to let the network learn to get the activations even closer to the correct values, you'll need to change the stopping criterion. This criterion is associated with the sum of sum-squared-error statistic (lst_sum_SE_Stat) in the TrainProcess. To access it, select .processes / Edit / Train / lst_sum_Train_SE_Stat from the .project window. The label "lst_sum_Train_SE_Stat" indicates that this SE_Stat (squared-error statistic) is associated with the TrainProcess. It originates at the trial level, but its sum over training trials within the epoch is passed to the epoch level, and the lst (last, latest) value at the epoch level is passed to the Train process.

An edit dialog box will come up when you Edit it. This may seem a bit daunting at this point -- we're letting you see how much there is under the hood here -- but bear with us for a moment. All you need to do is find the row of this dialog labeled se. You'll see its current value, a toggle indicating that it is set to serve as a stopping criterion, a criterion-type (here less-than-or-equal or <=), and to the right of this a numeric criterion value (which should be 0.04). Click in this numeric field, and set it to 0.01.

Before the new value takes effect, it must be propagated from the dialog box to the actual internal state of the simulator. As soon as you have started to make change, the dialog will highlight the Apply button to indicate that you need to press this button to apply any changes that have been made to the state of the simulator. Once you have the value field showing the new value that you want to use, click Apply and the change will be implemented. Then click Ok to dismiss the window Note that Ok also performs an "Apply" if necessary, so you can actually just do this in one step. However, often you'll want to keep a dialog around after you make changes, which is where the Apply button is useful.

Now hit Run again in the "Train" control panel, and the network will run around 70 more epochs to get its performance to the new, more stringent criterion.