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

Class JointScaling

source code

                                  object --+                            
                                           |                            
base.parameterizedobject.ParameterizedObject --+                        
                                               |                        
                  base.simulation.EventProcessor --+                    
                                                   |                    
                                      object --+   |                    
                                               |   |                    
          base.sheetcoords.SheetCoordinateSystem --+                    
                                                   |                    
                                    base.sheet.Sheet --+                
                                                       |                
                         base.projection.ProjectionSheet --+            
                                                           |            
                                             base.cf.CFSheet --+        
                                                               |        
                                         JointNormalizingCFSheet --+    
                                                                   |    
                                                              LISSOM --+
                                                                       |
                                                                      JointScaling

LISSOM sheet extended to allow joint auto-scaling of Afferent input projections.

An exponentially weighted average is used to calculate the average joint activity across all jointly-normalized afferent projections. This average is then used to calculate a scaling factor for the current afferent activity and for the afferent learning rate.

The target average activity for the afferent projections depends on the statistics of the input; if units are activated more often (e.g. the number of Gaussian patterns on the retina during each iteration is increased) the target average activity should be larger in order to maintain a constant average response to similar inputs in V1. The target activity for learning rate scaling does not need to change, because the learning rate should be scaled regardless of what causes the change in average activity.



Nested Classes [hide private]

Inherited from base.parameterizedobject.ParameterizedObject: __metaclass__

Instance Methods [hide private]
 
__init__(self, **params) source code
 
calculate_joint_sf(self, joint_total)
Calculate current scaling factors based on the target and previous average joint activities.
source code
 
do_joint_scaling(self)
Scale jointly normalized projections together.
source code
 
activate(self)
Compute appropriate scaling factors, apply them, and collect resulting activity.
source code

Inherited from LISSOM: input_event, printwts, process_current_time, start, state_pop, state_push

Inherited from JointNormalizingCFSheet: compute_joint_norm_totals, learn

Inherited from JointNormalizingCFSheet (private): _normalize_weights

Inherited from base.cf.CFSheet: release_unit_view, update_unit_view

Inherited from base.projection.ProjectionSheet: override_plasticity_state, present_input, projections, restore_plasticity_state

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

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]
  target = Number(default= 0.045, doc= ...
Target average activity for jointly scaled projections.
  target_lr = <topo.base.parameterclasses.Number object at 0xa8f...
Target average activity for jointly scaled projections.
  smoothing = <topo.base.parameterclasses.Number object at 0xa8f...
Influence of previous activity, relative to current, for computing the average.

Inherited from LISSOM: continuous_learning, mask_init_time, output_fn, post_initialization_weights_output_fn, precedence, tsettle

Inherited from base.cf.CFSheet: measure_maps

Inherited from base.projection.ProjectionSheet: apply_output_fn, dest_ports, mask, 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]

__init__(self, **params)
(Constructor)

source code 
Overrides: LISSOM.__init__

calculate_joint_sf(self, joint_total)

source code 

Calculate current scaling factors based on the target and previous average joint activities.

Keeps track of the scaled average for debugging. Could be overridden by a subclass to calculate the factors differently.

do_joint_scaling(self)

source code 

Scale jointly normalized projections together.

Assumes that the projections to be jointly scaled are those that are being jointly normalized. Calculates the joint total of the grouped projections, and uses this to calculate the scaling factor.

activate(self)

source code 

Compute appropriate scaling factors, apply them, and collect resulting activity.

Scaling factors are first computed for each set of jointly normalized projections, and the resulting activity patterns are then scaled. Then the activity is collected from each projection, combined to calculate the activity for this sheet, and the result is sent out.

Overrides: base.projection.ProjectionSheet.activate

Class Variable Details [hide private]

target

Target average activity for jointly scaled projections.
Value:
Number(default= 0.045, doc= """
        Target average activity for jointly scaled projections.""")

target_lr

Target average activity for jointly scaled projections.

Used for calculating a learning rate scaling factor.

Value:
Number(default= 0.045, doc= """
        Target average activity for jointly scaled projections.

        Used for calculating a learning rate scaling factor.""")

smoothing

Influence of previous activity, relative to current, for computing the average.
Value:
Number(default= 0.999, doc= """
        Influence of previous activity, relative to current, for computing the ave\
rage.""")