def connectV1Laterals(p,V1RingNo): ###################################################################################### # <<<<<WARNING>>>>: CANNOT CHANGE BOUNDS AND SIZE IN CONNECTIONS POST-INITIALISATION # ###################################################################################### if V1RingNo not in [1, 'MAX']: print "**WARNING**: COUPLED RING COUNT FOR V1 LATERAL INH and EXC" # topo.sim.connect( # 'V1','V1',delay=0.05,strength=p.exc_strength,name='LateralExcitatory', # connection_type=projection.CFProjection,learning_rate=p.exc_lr, # nominal_bounds_template=sheet.BoundingBox(radius=0.104), # weights_generator=pattern.Gaussian(aspect_ratio=1.0, size=0.05)) V1ExcParams = {'delay':0.05, 'strength':p.exc_strength, 'name':'LateralExcitatory', 'connection_type':projection.CFProjection, 'learning_rate':p.exc_lr, 'nominal_bounds_template':sheet.BoundingBox(radius=0.104), 'weights_generator':pattern.Gaussian(aspect_ratio=1.0, size=0.05)} V1ExcBoundsChanged = makeDelayedLaterals('V1', 'LateralExcitatory', V1ExcParams, V1RingNo, pattern.Gaussian, {'aspect_ratio':1.0, 'size':0.05}) # topo.sim.connect( # 'V1','V1',delay=0.05,strength=-1.0*p.inh_strength,name='LateralInhibitory', # connection_type=projection.CFProjection,learning_rate=p.inh_lr, # nominal_bounds_template=sheet.BoundingBox(radius=0.22917), # weights_generator=pattern.random.GaussianCloud(gaussian_size=0.15)) V1InhParams = {'delay':0.05, 'strength':-1.0*p.inh_strength, 'name':'LateralInhibitory', 'connection_type':projection.CFProjection,'learning_rate':p.inh_lr, 'nominal_bounds_template':sheet.BoundingBox(radius=0.22917), 'weights_generator':pattern.random.GaussianCloud(gaussian_size=0.15)} V1InhBoundsChanged = makeDelayedLaterals('V1', 'LateralInhibitory' , V1InhParams, V1RingNo, pattern.random.GaussianCloud, {'gaussian_size':0.15}) return [V1ExcBoundsChanged, V1InhBoundsChanged]
def connectLGNLaterals(LGNRingNo, PLOT): boundsChangeList = [] # LGN has lateral connections for divisive normalization for s in ['LGNOn','LGNOff']: lgn_surroundg = pattern.Gaussian(size=0.25,aspect_ratio=1.0, output_fns=[transferfn.DivisiveNormalizeL1()]) connectionParams = {'delay':0.05, 'name':'LateralGC', 'dest_port':('Activity'), 'activity_group':(0.6,DivideWithConstant(c=0.11)), 'connection_type': projection.SharedWeightCFProjection, 'strength':0.6, 'weights_generator':lgn_surroundg, 'nominal_bounds_template':sheet.BoundingBox(radius=0.25)} boundsChanged = makeDelayedLaterals(s, ('GC%s' % s), connectionParams, LGNRingNo, pattern.Gaussian, {'size':0.25,'aspect_ratio':1.0, 'output_fns':[transferfn.DivisiveNormalizeL1()]} ) boundsChangeList.append(boundsChanged) return boundsChangeList