A projection composed of ConnectionFields from a Sheet into a ProjectionSheet.
CFProjection computes its activity using a response_fn of type
CFPResponseFn (typically a CF-aware version of mdot) and output_fn
(which is typically IdentityOF). The initial contents of the
ConnectionFields mapping from the input Sheet into the target
ProjectionSheet are controlled by the weights_generator, cf_shape,
and weights_output_fn parameters, while the location of the
ConnectionField is controlled by the coord_mapper parameter.
Any subclass has to implement the interface
activate(self,input_activity) that computes the response from the
input and stores it in the activity array.
|
|
__init__(self,
initialize_cfs=True,
**params)
Initialize the Projection with a set of cf_type objects
(typically ConnectionFields), each located at the location
in the source sheet corresponding to the unit in the target
sheet. |
source code
|
|
|
|
|
|
|
activate(self,
input_activity)
Activate using the specified response_fn and output_fn. |
source code
|
|
|
|
apply_learn_output_fn(self,
mask)
Sub-classes can implement this function if they wish to
perform an operation after learning has completed, such as
normalizing weight values across different projections. |
source code
|
|
|
|
cf(self,
r,
c)
Return the specified ConnectionField |
source code
|
|
|
|
change_bounds(self,
nominal_bounds_template)
Change the bounding box for all of the ConnectionFields in this Projection. |
source code
|
|
|
|
|
|
|
create_mask(self,
shape,
bounds_template,
sheet)
Create the mask (see ConnectionField.__init__()). |
source code
|
|
|
|
get_view(self,
sheet_x,
sheet_y,
timestamp)
Return a single connection field UnitView, for the unit
located nearest to sheet coordinate (sheet_x,sheet_y). |
source code
|
|
|
|
learn(self)
For a CFProjection, learn consists of calling the learning_fn. |
source code
|
|
|
|
n_units(self)
Return the number of unmasked units in a typical ConnectionField. |
source code
|
|
|
Inherited from projection.Projection:
get_projection_view,
override_plasticity_state,
restore_plasticity_state
Inherited from simulation.EPConnection:
remove,
script_repr
Inherited from param.parameterized.Parameterized:
__getstate__,
__repr__,
__setstate__,
__str__,
debug,
defaults,
force_new_dynamic_value,
get_param_values,
get_value_generator,
inspect_value,
message,
print_param_values,
set_dynamic_time_fn,
state_pop,
state_push,
verbose,
warning
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__setattr__
|
|
|
allow_null_cfs = param.Boolean(default= False, doc= "Whether o...
Whether or not the projection can have entirely empty CFs
|
|
|
apply_output_fn_init = param.Boolean(default= True, doc= ...
Whether to apply the output function to connection fields (e.g.
|
|
|
autosize_mask = param.Boolean(default= True, constant= True, p...
Topographica sets the mask size so that it is the same as the connection field's
size, unless this parameter is False - in which case the user-specified size of
the cf_shape is used.
|
|
|
cf_shape = param.ClassSelector(PatternGenerator, default= patt...
Define the shape of the connection fields.
|
|
|
cf_type = param.Parameter(default= ConnectionField, constant= ...
Type of ConnectionField to use when creating individual CFs.
|
|
|
coord_mapper = param.ClassSelector(CoordinateMapperFn, default...
Function to map a projected coordinate into the target sheet.
|
|
|
learning_fn = param.ClassSelector(CFPLearningFn, default= CFPL...
Function for computing changes to the weights based on one activation step.
|
|
|
learning_rate = param.Number(default= 0.0, softbounds= (0, 100...
Amount of learning at each step for this projection, specified
in units that are independent of the density of each Sheet.
|
|
|
nominal_bounds_template = BoundingRegionParameter(default= Bou...
Bounds defining the Sheet area covered by a prototypical ConnectionField.
|
|
|
precedence = param.Number(default= 0.8)
|
|
|
response_fn = param.ClassSelector(CFPResponseFn, default= CFPR...
Function for computing the Projection response to an input pattern.
|
|
|
same_cf_shape_for_all_cfs = param.Boolean(default= True, doc= ...
Whether or not to share a single cf_shape mask for all CFs.
|
|
|
strength = param.Number(default= 1.0, doc= ...
Global multiplicative scaling applied to the Activity of this Sheet.
|
|
|
weights_generator = param.ClassSelector(PatternGenerator, defa...
Generate initial weights values.
|
|
|
weights_output_fn = param.ClassSelector(CFPOutputFn, default= ...
Function applied to each CF after learning.
|
|
Inherited from projection.Projection:
activity_group,
dest_port,
output_fn,
plastic,
src_port
Inherited from simulation.EPConnection:
delay,
dest,
private,
src
Inherited from param.parameterized.Parameterized:
name,
print_level
|