Package topo :: Package sheets :: Module lissom :: Class JointNormalizingCFSheet
[hide private]
[frames] | no frames]

Class JointNormalizingCFSheet

source code

                                  object --+                    
                                           |                    
base.parameterizedobject.ParameterizedObject --+                
                                               |                
                  base.simulation.EventProcessor --+            
                                                   |            
                                      object --+   |            
                                               |   |            
          base.sheetcoords.SheetCoordinateSystem --+            
                                                   |            
                                    base.sheet.Sheet --+        
                                                       |        
                         base.projection.ProjectionSheet --+    
                                                           |    
                                             base.cf.CFSheet --+
                                                               |
                                                              JointNormalizingCFSheet
Known Subclasses:
JointNormalizingCFSheet_Continuous, LISSOM

A type of CFSheet extended to support joint sum-based normalization.

For L1 normalization, joint normalization means normalizing the sum of (the absolute values of) all weights in a set of corresponding CFs in different Projections, rather than only considering weights in the same CF.

This class makes it possible for a model to use joint normalization, by providing a mechanism for grouping Projections (see _port_match), plus a learn() function that computes the joint sums. Joint normalization also requires having ConnectionField store and return a norm_total for each neuron, and having an OutputFn that will respect this norm_total rather than the strict total of the ConnectionField's weights. At present, CFPOF_DivisiveNormalizeL1 and CFPOF_DivisiveNormalizeL1_opt do use norm_total; others can be extended to do something similar if necessary.

To enable joint normalization, you can declare that all the incoming connections that should be normalized together each have a dest_port of:

dest_port=('Activity','JointNormalize', 'AfferentGroup1'),

Then all those that have this dest_port will be normalized together, as long as an appropriate OutputFn is being used.



Nested Classes [hide private]

Inherited from base.parameterizedobject.ParameterizedObject: __metaclass__

Instance Methods [hide private]
 
start(self)
Called by the simulation when the EventProcessor is added to the simulation.
source code
 
compute_joint_norm_totals(self, projlist, mask)
Compute norm_total for each CF in each projection from a group to be normalized jointly.
source code
 
_normalize_weights(self, mask=None)
Apply the weights_output_fn for every group of Projections.
source code
 
learn(self)
Call the learn() method on every Projection to the Sheet, and call the output functions (jointly if necessary).
source code

Inherited from base.cf.CFSheet: release_unit_view, update_unit_view

Inherited from base.projection.ProjectionSheet: __init__, activate, input_event, override_plasticity_state, present_input, process_current_time, projections, restore_plasticity_state

Inherited from base.sheet.Sheet: activity_len, release_sheet_view, row_col_sheetcoords, sheet_cols, sheet_offset, sheet_rows, state_pop, state_push

Inherited from base.simulation.EventProcessor: script_repr, send_output

Inherited from base.simulation.EventProcessor (private): _src_connect

Inherited from base.parameterizedobject.ParameterizedObject: __getstate__, __repr__, __setstate__, __str__, as_uninitialized, debug, defaults, force_new_dynamic_value, get_param_values, get_value_generator, inspect_value, message, print_param_values, verbose, warning

Inherited from base.sheetcoords.SheetCoordinateSystem: bounds2slice, closest_cell_center, matrix2sheet, matrixidx2sheet, sheet2matrix, sheet2matrixidx, sheetcoordinates_of_matrixidx, slice2bounds

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Class Methods [hide private]

Inherited from base.parameterizedobject.ParameterizedObject: params, print_param_defaults

Class Variables [hide private]

Inherited from base.cf.CFSheet: measure_maps, precedence

Inherited from base.projection.ProjectionSheet: apply_output_fn, dest_ports, mask, output_fn, src_ports

Inherited from base.sheet.Sheet: layout_location, nominal_bounds, nominal_density, plastic

Inherited from base.parameterizedobject.ParameterizedObject: name, print_level

Properties [hide private]

Inherited from base.sheetcoords.SheetCoordinateSystem: shape, xdensity, ydensity

Inherited from object: __class__

Method Details [hide private]

start(self)

source code 

Called by the simulation when the EventProcessor is added to the simulation.

If an EventProcessor needs to have any code run when it is added to the simulation, the code can be put into this method in the subclass.

Overrides: base.simulation.EventProcessor.start
(inherited documentation)

_normalize_weights(self, mask=None)

source code 

Apply the weights_output_fn for every group of Projections.

The mask is telling which neurons need to be normalized.

learn(self)

source code 
Call the learn() method on every Projection to the Sheet, and call the output functions (jointly if necessary).
Overrides: base.projection.ProjectionSheet.learn