A ProcessingMechanism is a type of
Mechanism that transforms its input in some way. A ProcessingMechanism always
receives its input either from another Mechanism, or from the input to a Composition when it is
executed. Similarly, its output is generally conveyed to another Mechanism or used as the output for a Composition.
The ProcessingMechanism is the simplest mechanism in PsyNeuLink. It does not have any extra arguments or
specialized validation. Almost any PsyNeuLink Function, including the UserDefinedFunction, may be the function of a
ProcessingMechanism. Currently, the only exception is
BackPropagation. Subtypes of
ProcessingMechanism have more specialized state_features, and often have restrictions on which Functions are allowed.
The output of a ProcessingMechanism may also be used by a ModulatoryMechanism to modify the
parameters of other components (or its own parameters). ProcessingMechanisms are always executed before all
ModulatoryMechanisms in the Composition to which they belong, so that any modifications made by the ModulatoryMechanism
are available to all ProcessingMechanisms in the next
Creating a ProcessingMechanism¶
A ProcessingMechanism is created by calling its constructor.
>>> import psyneulink as pnl >>> my_linear_processing_mechanism = pnl.ProcessingMechanism(function=pnl.Linear)
in which case all of the function’s parameters will be set to their default values.
Alternatively, the function argument may be a call to a Function constructor, in which case values may be specified for the Function’s parameters:
>>> my_logistic_processing_mechanism = pnl.ProcessingMechanism(function=pnl.Logistic(gain=1.0, bias=-4))
See documentation for individual subtypes of ProcessingMechanism for more specific information about their structure.
list of the dictionary specifications for StandardOutputPorts that can be assigned as OutputPorts, in addition to the
standard_output_portsof a Mechanism; each assigns as the
valueof the OutputPort a quantity calculated over the elements of the first item in the outermost dimension (axis 0) of the Mechanism`s
value. Subclasses of ProcessingMechanism may extend this list to include additional StandardOutputPorts.
mean of the elements.
median of the elements.
standard deviation of the elements.
variance of the elements.
greatest signed value of the elements.
greatest absolute value of the elements.
element with the greatest signed value is assigned that value, all others are assigned 0.
element with the greatest absolute value is assigned that value, all others are assigned 0.
- MAX_INDICATOR1d array
element with the greatest signed value is assigned 1, all others are assigned 0.
- MAX_ABS_INDICATOR1d array
element with the greatest absolute value is assigned 1, all others are assigned 0.
element chosen probabilistically based on softmax distribution is assigned its value, all others are assigned 0.