A simple implementation in nengo bio
import nengo
import nengo_bio as bio
import numpy as np
with nengo.Network() as model:
ens_1 = bio.Ensemble(
n_neurons=5,
dimensions=1,
locations=bio.NeuralSheetDist())
ens_2 = bio.Ensemble(
n_neurons=5,
dimensions=1,
locations=bio.NeuralSheetDist())
conn = bio.Connection((ens_1,),
ens_2,
connectivity= bio.SpatiallyConstrainedConnectivity(divergence=5, sigma=0.25))
with nengo.Simulator(model, progress_bar=None) as sim:
pass
p_conn = sim.data[conn]
print("p_conn", p_conn)
The above code gives the output:
BuiltConnection(weights={excitatory: array([[0. , 0.00276029, 0.04807454, 0. , 0. ],
[0. , 0.00552506, 0. , 0. , 0. ],
[0. , 0.04315878, 0. , 0. , 0. ],
[0. , 0. , 0.06970483, 0. , 0. ],
[0. , 0. , 0. , 0.17995318, 0.00024035]]), inhibitory: array([[-0.04103491, -0. , -0. , -0. , -0. ],
[-0.09083047, -0. , -0.00314321, -0. , -0. ],
[-0. , -0. , -0.03837767, -0. , -0. ],
[-0. , -0.24996182, -0. , -0.07804426, -0. ],
[-0. , -0. , -0. , -0. , -0. ]])}, connectivity=array([[[ True, True, True, False, False],
[ True, True, False, False, False],
[False, True, True, True, False],
[False, False, True, True, False],
[False, False, False, True, True]],
[[ True, True, False, False, False],
[ True, True, True, False, False],
[False, True, True, False, False],
[False, True, True, True, False],
[False, False, True, True, True]]]))
Here, I am interested in the connectivity array which is (2, 5, 5).
-
In weights, we have excitatory weights and inhibitory weights, so I believe that the connectivity array p_conn[1][0] indicates excitatory connections and p_conn[1][1] indicates inhibitory connections. Is that correct?
-
If the above statement is true, then how can a connection be both inhibitory and excitatory at the same time? For example:
print("p_conn[1][0]=", p_conn[1][0], "\n")
print("p_conn[1][1]=", p_conn[1][1])
p_conn[1][0]= [[ True, True, True, False, False],
[ True, True, False, False, False],
[False, True, True, True, False],
[False, False, True, True, False],
[False, False, False, True, True]],
p_conn[1][1]= [[ True, True, False, False, False],
[ True, True, True, False, False],
[False, True, True, False, False],
[False, True, True, True, False],
[False, False, True, True, True]]
If you see the highlighted rows, the first two value for both is True. Please clarify
-
The way I understand this connectivity array is neuron 0 of ens_1 is connected to neuron 0 of ens_2 since it is True. So the rows represent neurons of ens_1 and the columns represent neurons of ens_2. Is that correct?
-
These connections are one-way i.e. ens_1 to ens_2 and not recurrent connections. Correct?
-
It is not possible to probe nengo bio connections. True?
-
It is not possible to apply the learning rule in nengo bio connections. True?
-
nengo bio connections are decoded connections or direct connections? How to make decoded and direct connections in nengo bio?
-
What is the difference between sim.data[conn] and sim.data[p_conn] where p_conn = nengo.Probe[conn] and conn is a nengo connection and not a bio connection?