Information Technology Reference
In-Depth Information
void ConstrCtrl::Run() {
// note that we need to specify subgroup
// for the training process (.gp.Train)
.processes.gp.Train[0].ReInit();
.processes.gp.Train[0].Run();
.processes.Leaf(i));
// this is necessary to make sure all the
// processing for closing the windows
// happens before we continue
taivMisc::FlushIVPending();
}
}
void ConstrCtrl::RunTest() {
.processes.gp.Test[0].ReInit();
.processes.gp.Test[0].Run();
Finally, we again need to create a instance of this new
type, and then edit it:
}
ConstrCtrl constr_ctrl;
EditObj(constr_ctrl);
Next, we define the window manipulation routines:
void ConstrCtrl::Train() {
EverythingOff();
Then, just Compile and Run the new script.
You should see the control panel window, and can
press the buttons and alter the parameters as you want.
You now have performed all the basic tasks that go
into creating a simulation! While there are many other
things you can do, you should now at least have some
idea as to where to start to accomplish the things you
want.
We would strongly recommend reading one of the
many good C++ topics available to learn how to
use the script language better. Finally, we reiter-
ate that the PDP++ users manual, available from the
Help menu on each object and in printed form from
www.cnbc.cmu.edu/PDP++/PDP++.html , con-
tains a wealth of detailed information on all of the gen-
eral PDP++ objects, and is an essential reference guide
for constructing more complex simulations.
\
// turn everything off first
.processes.gp.Train[0].ControlPanel();
.logs.Epoch_Trn_GraphLog.DeIconify();
}
void ConstrCtrl::Test() {
EverythingOff();
\
// turn everything off first
.processes.gp.Test[0].ControlPanel();
.logs.Trial_Tst_GridLog.DeIconify();
}
which just turn everything off, and then deiconify the
appropriate windows (you might want to deiconify the
testing grid log too, since it is updated during training,
but we will leave that out for the time being just to make
these functions seem more useful).
The EverythingOff function is somewhat com-
plicated, but essentially it just iconifies things (or gets
rid of control panels), and then makes sure all of the re-
sulting windowing actions actually get processed before
continuing:
B.7
Creating SRN Context Layers
This section describes the specific steps that need
to be taken to construct an SRN context layer (see
chapter 6 for details). First, the LayerSpec needs
to be set to be a LeabraContextLayerSpec ,
which has the fm_hid and fm_prv parameters
on it, and controls the updating of the units.
Do this by going to .specs/New/ and selecting
LeabraContextLayerSpec as the type of object.
Then, select the layer that is to be the context layer, and
do Selections in the network window, and set the
layer spec to be this new layer spec you created.
Second, a projection with a OneToOnePrjnSpec
projection spec from the hidden layer to the context
void ConstrCtrl::EverythingOff() {
if(!taMisc::iv_active)
return;
int i;
for(i=0; i<.logs.size; i++)
.logs[i].Iconify();
// don't actually iconify network - only one
// for(i=0; i<.networks.size; i++)
// .networks[i].Iconify();
for(i=0; i<.environments.size; i++)
.environments[i].Iconify();
for(i=0; i<.processes.leaves; i++)
taivMisc::CloseEdits(.processes.Leaf(i),\
Search WWH ::




Custom Search