def connect(self): # connect populations self.injection = pynn.Projection(self.sources, self.columns, pynn.FixedProbabilityConnector( 0.02, weights=0.0033 * 2), target='excitatory', rng=pynn.random.NumpyRNG(seed=5337)) self.recurrent_excitation = pynn.Projection( self.columns, self.columns, pynn.OneToOneConnector(weights=0.01 * 2), target='excitatory') self.lateral_inhibition = pynn.Projection( self.columns, self.columns, pynn.DistanceDependentProbabilityConnector('d < 10', weights=0.004 * 2), target='inhibitory', rng=pynn.random.NumpyRNG(seed=5337)) self.global_inhibition = pynn.Projection( self.inhibitory_pool, self.columns, pynn.FixedProbabilityConnector(0.8, weights=0.0012 * 2), target='inhibitory', rng=pynn.random.NumpyRNG(seed=5337)) self.forward_inhibition = pynn.Projection( self.sources, self.inhibitory_pool, pynn.FixedProbabilityConnector(0.8, weights=0.0035), target='excitatory', rng=pynn.random.NumpyRNG(seed=5337))
def create_local_inhibition(layers_dict): """ Creates local inhibitory connections from a neuron to its neighbors in an area of a fixed distance. The latency of its neighboring neurons decreases linearly with the distance from the spike from 15% to 5%, as described in Masquelier's paper. Here we assumed that a weight of -10 inhibits the neuron completely and took that as a starting point. """ for size, layers in layers_dict.items(): print('Create local inhibition for size', size) for layer in layers: sim.Projection(layer.population, layer.population, sim.DistanceDependentProbabilityConnector( 'd < 5', allow_self_connections=False), sim.StaticSynapse(weight='.25 * d - 1.75'), space=space.Space(axes='xy'))
def connect(self): n_cells = self.parameters.config.n_cells n_segments = self.parameters.config.n_segments # connect populations pynn.Projection(self.distal_input, self.distal, pynn.OneToOneConnector(weights=0.025)) for i in range(self.parameters.config.n_columns): # get "compartments" for all cells in this column inhibitions = self.inhibitory[i * n_cells:(i + 1) * n_cells] somas = self.soma[i * n_cells:(i + 1) * n_cells] proximal_input = pynn.PopulationView(self.proximal_input, [i]) # set up connections with columnar symmetry pynn.Projection(inhibitions, somas, pynn.DistanceDependentProbabilityConnector( 'd>=1', weights=0.2), target='SYN_2') # 4 pynn.Projection(proximal_input, somas, pynn.AllToAllConnector(weights=0.08), target='SYN_1') # 1 pynn.Projection(proximal_input, inhibitions, pynn.AllToAllConnector(weights=0.042)) # 2 for j in range(self.parameters.config.n_cells): # get "compartments" for this specific cell segments = self.distal[i * n_cells * n_segments + j * n_segments:i * n_cells * n_segments + (j + 1) * n_segments] inhibition = pynn.PopulationView(self.inhibitory, [i * n_cells + j]) soma = pynn.PopulationView(self.soma, [i * n_cells + j]) # set up connections with cellular symmetry pynn.Projection(segments, inhibition, pynn.AllToAllConnector(weights=0.15), target='inhibitory') # 3 pynn.Projection(segments, soma, pynn.AllToAllConnector(weights=0.15), target='SYN_3') # 3