




The TesselPrjnSpec connects two layers using tesselations (repeated
patterns) of connectivity. These patterns are defined in terms of a
"receptive field" which is a two-dimensional pattern of connectivity
into a given receiving unit. This pattern is defined in terms of
two-dimensional X,Y offsets of the sending units relative to the
position of a given receiving unit. Thus, there is an assumed
correspondence between the layout of the receiving and sending units.
Which receiving units get this receptive field is determined by
offset and skip parameters which allow one to have different receptive
fields for the even and odd units, for example.
The center of each receiving unit's receptive field over the sending
layer is either in direct correspondence with the coordinates of the
receiving unit within its layer, or there can be a scaling of the
coordinates based on the relative sizes of the two layers, so that the
receiving units evenly cover the sending layer. Also, contiguous
receivers can share the same effective receptive field center by using
the recv_group
parameters.
In addition, since the TesselPrjnSpec creates repeated versions of
the same connectivity pattern, it is a natural place to implement weight
sharing. There is a choice on the spec, link_type
, that
can establish shared weights among all units in the same
recv_group
(GP_LINK
), or each unit has the the same
weights (UN_LINK
).
Finally, there are a number of functions which automatically generate
receptive fields according to simple geometric shapes, or create
receptive fields from patterns of selected units in the NetView
(see section 10.6 Network Viewer). Further, the weight values for these connections
can be initialized to specified values (use the init_wts
and set
the wt_val
values), and distance-based values can be computed
automatically using functions. These are described below.
The spec has the following parameters:
TwoDCoord recv_off
-
The offset (XY) in the layer for the start of the receiving units.
Units before this offset do not get connections.
TwoDCoord recv_n
-
The number of receiving units in each dimension (XY). The default
values of -1 means use all the receiving units (after the offset).
TwoDCoord recv_skip
-
The number of receiving units to skip in each dimension (XY). Thus, one
could have one spec controlling the even units and another for the odd
units in a given layer. NOTE: this is ignored when
GP_LINK
is
used, for technical reasons.
TwoDCoord recv_group
-
The number of receiving units to group together with the same receptive
field center in each dimension (XY). Thus, one can have groups of units
with identical receptive fields.
bool wrap
-
Indicates whether or not to wrap coordinates at the edges of the sending
layer (otherwise it clips at the layer edges).
bool link_type
-
Indicates whether and how to link together receiving weights:
NO_LINK
-
Each unit has its own weights, as is normally the case.
GP_LINK
-
Shares weights among an entire
recv_group
of units, where the 1st
unit in each group has the same weights, etc.
UN_LINK
-
The same weights are shared between all units (each unit has the same
weights). Also see
link_src
.
TwoDCoord link_src
-
The index of the receiving unit that should serve as the
"source" unit for unit linked weights. If sending coordinates are not
being wrapped, then the first unit in the receiving layer will likely
not have the full complement of connections, since some of them will
have been clipped, so this allows a unit that has the full complement of
connections to be indicated as the source, which has to have all the
possible connections.
FloatTwoDCoord send_scale
-
Scales the coordinates of the receiving unit in order to determine
the coordinates of the center of the receptive field in the sending
layer. Thus, if in a given dimension (X or Y) there are only four units
in the receiving layer and 8 units in the sending layer, one might want
to use a scale of 2 in that dimension so the receivers will cover the
whole sending layer.
TwoDCoord send_border
-
A border (offset) that is added to the receiving unit's coordinates
(after scaling, see above) in order to determine the coordinates of the
center of the receptive field in the sending layer.
TessEl_List send_offs
-
A list of offsets of the sending units. These offsets are
relative to the center of the receiving unit's receptive field in the
sending layer, computed as described above. Each offset is a member of
the class TessEl which has the members:
TwoDCoord send_off
-
The offset from the center of the receptive field.
float wt_val
-
The value to assign to the weight of the connection. These weight
values are given to the weight upon creation of the connection, but if
the ConSpec performs its own initialization of the weights, they
will be lost. Also, if learning is taking place, the only way to
reinstate these values is to reconnect the network.
The functions that make particular receptive fields are as follows:
MakeEllipse(int half_width, int half_height, int ctr_x, int ctr_y)
-
Constructs an elliptical receptive field from the given parameters. The
ctr_x and y specify the center of the receptive field. For example,
half_width = half_height = 2, ctr_x = ctr_y = 0, gives a circle from -2
to 2 in x and y.
MakeRectangle(int width, int height, int ctr_x, int ctr_y)
-
Constructs a rectangular receptive field from the given parameters.
ctr_x and _y are as in MakeEllipse (e.g., specifying a width, height of
5 and ctr_x, _y of 0 gives x and y coordinates from -2 to 2.
MakeFromNetView(NetView* view)
-
Uses the currently selected units in the NetView to create a
receptive field. First select a receiving unit, which establishes the
center of the receptive field (this should be in the receiving layer).
Then, in the sending layer, select the receptive field pattern. All
units must be selected (use multiple-select) before this function is
called.
WeightsFromDist(float scale)
-
Initializes the
wt_val
value of each element of the receptive
field according to its distance in offset coordinates, scaled by the
given scale parameter. Note that init_wts
must be set for these
weights to be used in initializing the weights.
WeightsFromGausDist(float scale, float sigma)
-
Like the above, but it uses a Gaussian function of the distance, with a
standard deviation equal to the given sigma parameter.




