As discussed in section 11.3 Representing Sequences of Events, environments can be constructed that specify sequences of events. Certain algorithms can learn temporal contingencies between events, so it is important to be able to present the events in the proper sequence. There are two specialized types of schedule processes that handle the presentation of sequences of events to the network, the SequenceEpoch, and the SequenceProcess.
The SequenceEpoch is a version of the epoch process
(see section 12.4.3 Iterating over Trials: EpochProcess) which, instead of iterating over individual
events, iterates over groups of events. Thus, this process uses
the GroupCount()
and GetGroup()
functions on the
environment instead of the event-wise ones (see section 11.1 Environments). Each
group of events represents a collection of events that form a sequence.
The sequence epoch adds a cur_event_gp
field, which contains a
pointer to the current event group that is being processed.
The order
field on the sequence version of the epoch process now
refers to the order of presentation of the groups (sequences) of events,
and not the order of individual events within the sequences. Also, the
SMALL_BATCH
mode of wt_update
in the sequence epoch means
that the weights are updated after every sequence, not after every
batch_n
events.
The SequenceProcess is typically created as a child of the SequenceEpoch, and it is the one that iterates over the particular events within a given group or sequence. It obtains the current group of events from its parent sequence epoch process, and iterates over them. It can control the order of presentation of events within the sequence, and has options for initializing the activation state of the network at the start of the sequence:
Counter tick
max
for this counter is automatically set to be the number of
events in the current sequence.
Event* cur_event
Event_MGroup* cur_event_gp
Order order
SEQUENTIAL
order, it is conceivable that one might want PERMUTED
or
RANDOM
orders as well, which are available (these work just like
the equivalent in the epoch process, see section 12.4.3 Iterating over Trials: EpochProcess).
StateInit sequence_init
DO_NOTHING
means that
no initialization is done, INIT_STATE
means that the
InitState
function is called, and MODIFY_STATE
means that
the ModifyState
function is called, which allows for
algorithm-specific ways of changing state between sequences (e.g.
decaying the activations).