Information Technology Reference
In-Depth Information
Each statistic usually has a reasonable
DEFAULT
value for the
Loop/Final
field, but you may need
to change it sometimes.
LOOP
means that the statistic
will be computed during each iteration of the process
(e.g., after every event if created in the loop of an epoch
process), and
FINAL
means that it will be computed
when the process is done (e.g., at the end of the epoch
in the above example). Let's just leave it at
DEFAULT
for now.
The
CreateAggregates
flag is set by default,
since it is often useful to have higher-level aggregation
of a given statistic. For example, the
sum_se
statistic,
which is computed during each trial, has to be aggre-
gated by summing over the trials to get a total error for
the entire epoch. We can leave this flag set here, even
though we don't have any immediate need for the ag-
gregated values of this statistic.
ing process into the training process hierarchy. Each
level of processing has three different places (groups)
where other processes can be attached:
init_procs
,
loop_procs
,and
final_procs
. As you might
guess, the difference is whether the attached processes
are run at the start (init), during the iteration (loop), or
at the end (final) of the given process's running. Further
a given process can either be created and “live” entirely
within one of these groups, or in the current case, it can
live elsewhere and just be linked into the group. The
difference between being owned versus linked is impor-
tant — if the owning process is removed, then you lose
all the other processes that it owns. If it is linked, then
it persists independently (and must have been already
created, just like our testing process).
Given the above considerations, we want to link the
testing process into the
final_procs
of the training
EpochProcess
. Thus, at the end of an epoch of train-
ing, we will run an epoch of testing.
Press the
Ok
button using the right mouse button,
so that you can edit the resulting statistic object.
You will then get another dialog window asking for
the type of aggregation to perform.
To do this, first select the
Epoch_Tst
icon in the
project window, then use the middle button (or shift and
the left button) to extend the selection to the
Epoch_Trn
icon. Then, hit the
New Link
button. A dialog will come
up asking if you want to link
Epoch_Tst
into a process
subgroup on
Epoch_Trn
-thisiscorrect,sowehit
Yes
.
The next dialog asks which group to put
Epoch_Tst
into
— click on
Final Procs
.
You should now see that
Epoch_Tst
shows up as
an orange icon under the
Epoch_Trnfinal_procs
group. Processes that are linked or created under a main
schedule process are rendered in orange.
Select
SUM
here.
When the edit window comes up, you will notice that
the
layer
field has been set to
Input
by default.
You actually want to set
layer
to the
Output
layer. Also, to replicate the tolerance typically used in
the squared error statistic, you should set
dst_tol
to
.5. Then
Ok
this edit dialog.
You should see in the project window that the new
statistic was in fact created in the
loop_stats
of the
Trial_Tst
process, like all the other processes (as
this is the default). You can select this new statistic and
do
Show Aggs
to see these aggregators highlighted.
,
!
Now,
ReInit
the
Train_Trn
train process, and
then
Run
it.
You should see that testing is run after every epoch
of training. Often, you want to run testing only every
Now you should
Clear
the grid log again, and then
Run
the testing process.
The grid log will now need a little bit of cleaning up.
(e.g., 5 or 10) epochs of training. We can do this by
setting the
mod
parameters of the testing epoch process,
so that it will be run
modulo
the training epoch count
(where modulo gives the remainder after dividing by n,
which cycles between 0 and n-1).
You'll want to move all the overlapping labels over
to the right (using the left mouse button), and then right
click on
min_dst
to change it from a
BLOCK
to
TEXT
.
Edit the
Epoch_Tst
process (e.g., right mouse but-
ton on its icon in the project window), and set the
mod m
value to 5 (for example).
Run
the training process again,
and observe that testing only occurs every 5 training
epochs.
B.4.3
Automatically Testing during Training
So far, this setup is sufficient for testing the network af-
ter training — what if you want to run a test after each
epoch of training?
To do this, we will
link
the test-
Search WWH ::
Custom Search