10.4 Units

Units are the basic computational elements of networks. They typically integrate information from a number of sources (inputs), and perform some relatively simple type of processing on these inputs, and then output a single value which somehow summarizes its response to the inputs.

The basic Unit class in PDP++ contains real valued variables for representing a unit's activation and its net input from other units as well as its target pattern and/or external training input. In addition the unit class contains subgroups of sending and receiving connections between other units, and a 'bias' connection, which may or may not be present depending on the algorithm. A unit also has a position which represents its relative offset from its layer's position in the netview (see section 10.6 Network Viewer).

As with many objects in PDP++, the Unit relies on a corresponding UnitSpec to provide most of the functions and parameters that control the unit's behavior. The unit itself contains the state variables. Thus, different units can have different parameters and functions simply by changing which UnitSpec they point to.

The following variables are found on the Unit:

UnitSpec_SPtr spec
A pointer to the unit specifications for this unit (see below).
Geometry pos
Specifies the unit's 3-D position relative to the layer. Used for display purposes and optionally for certain projection patterns
ExtType ext_flag
This flag indicates which kind of external input unit last received. This may have one of four values:
NO_EXTERNAL
Indicates that the unit received no input.
TARG
Indicates that the unit received a target value, which is in the targ field.
EXT
Indicates that the unit received external input, which is in the ext field.
TARG_EXT
Indicates that the unit received both a target and external input.
COMP
Indicates that the unit has a comparison value in its targ field. This is for computing an error statistic or other comparisons, but not for training the network.
COMP_TARG
Both a comparison and a target (this is redundant, since all target values are included in comparisons anyway..)
COMP_EXT
Both a comparsion and an external input.
COMP_TARG_EXT
All three.
float targ
The target value that the unit is being taught to achieve (i.e., for output units in a backpropagation network).
float ext
The external input that the unit received. Depending on the algorithm, this can be added into the net input for the unit (soft clamping), or the unit' activation can be set to this value (hard clamping).
float act
The unit's activation value, which is typically a function of its net input.
float net
The unit's net input value, which is typically computed as a function of the sending unit's activations times their weights.
Con_Group recv
This group contains the unit's receiving connections. Each projection creates its own sub-group within this group (see section 8.2 Groups), so recv just contains sub-groups which themselves contain the actual connections.
Con_Group send
This group contains sub-groups containing the unit's sending connections, one sub-group per projection (just like recv).
Connection* bias
A pointer to a Connection object which contains the bias weight for this Unit. Bias weights are treated as special connections which do not have a corresponding sending unit. This pointer may be NULL if the unit does not have a bias weight. The type of connection created here is specified by the bias_con_type member of the UnitSpec, and the ConSpec for this connection is in the bias_spec member of the UnitSpec.

The basic UnitSpec class defines the set of computational functions on the unit, and has parameters which control the unit's behavior. Specific algorithms add more parameters to this object.

MinMaxRange act_range
The legal range of activation values for the unit.
TypeDef* bias_con_type
The type of bias connection to create in the unit. The default value for this is set by different algorithms, and it can be NULL if no bias connections are to be created. The 'Build' operation should be performed if this connection type is changed manually.
ConSpec_SPtr bias_spec
This ConSpec controls the behavior of the bias on the unit in an algorithm-dependent fashion.

Note: the following information should be useful to those who wish to program in PDP++, but is not necessary for the average user to understand.