def lateral_inhibitory(self, src_properties, dest_properties): """ Switch to divisive inhibition, otherwise parameters unchanged. """ return Model.CFProjection.params( delay=0.05, name='LateralInhibitory', weights_generator=ig.random.GaussianCloud( gaussian_size=self.latinh_size), strength=self.inh_strength, activity_group=(0.6, DivideWithConstant(c=self.division_constant)), learning_rate=self.inh_lr, nominal_bounds_template=sheet.BoundingBox( radius=self.latinh_radius))
def lateral_gain_control(self, src_properties, dest_properties): #TODO: Are those 0.25 the same as lgnlateral_radius/2.0? return Model.SharedWeightCFProjection.params( delay=0.05, dest_port=('Activity'), activity_group=(0.6, DivideWithConstant(c=0.11)), weights_generator=imagen.Gaussian( size=0.25, aspect_ratio=1.0, output_fns=[transferfn.DivisiveNormalizeL1()]), nominal_bounds_template=sheet.BoundingBox(radius=0.25), name=('LateralGC' + src_properties['eye'] if 'eye' in src_properties else 'LateralGC'), strength=0.6 / len(self.attrs.Eyes))
def lateral_gain_control(self, src_properties, dest_properties): #TODO: Are those 0.25 the same as lgnlateral_radius/2.0? name='LateralGC' if 'eye' in src_properties: name+=src_properties['eye'] if 'SF' in src_properties and self.gain_control_SF: name+=('SF'+str(src_properties['SF'])) return Model.SharedWeightCFProjection.params( delay=0.05, dest_port=('Activity'), activity_group=(0.6,DivideWithConstant(c=0.11)), weights_generator=imagen.Gaussian(size=self.gain_control_size, aspect_ratio=1.0, output_fns=[transferfn.DivisiveNormalizeL1()]), nominal_bounds_template=sheet.BoundingBox(radius=self.gain_control_size), name=name, strength=0.6/(2 if self['binocular'] else 1))