neurai.nn.conn package#
Submodules#
- class neurai.nn.conn.connrule.All2All#
Bases:
Connector
Connect each neuron in the pre-population to all neurons in the post-population.
- class neurai.nn.conn.connrule.CustomConn(**kwargs)#
Bases:
Connector
Connect the pre-population with the post-population from user custom data.
If conn_repr is ConnectRepr.COO, user must to give the ‘pre_ids, post_ids’ or ‘mat’; If conn_repr is ConnectRepr.CSR, user must to give the ‘post_ids, pre_indptr’ or ‘pre_ids, post_ids’ or ‘mat’; If conn_repr is ConnectRepr.CSC, user must to give the ‘pre_ids’ and ‘post_indptr’ or ‘pre_ids, post_ids’ or ‘mat’; If conn_repr is ConnectRepr.MAT, user must to give the ‘mat’;
- Parameters:
pre_ids (np.ndarray(int), jnp.ndarray(int), jnp.ndarray(int), list(int)) – The indices of pre-population neurons to the indices of post-population neurons.
post_ids (np.ndarray(int), jnp.ndarray(int), jnp.ndarray(int), list(int)) – The indices of post-population neurons to the indices of pre-population neurons.
pre_indptr (np.ndarray(int), jnp.ndarray(int), jnp.ndarray(int), list(int)) – The index pointer array for the start of each row in the index array.
post_indptr (np.ndarray(int), jnp.ndarray(int), jnp.ndarray(int), list(int)) – The index pointer array for the start of each column in the index array.
mat (np.ndarray(bool), jnp.ndarray(bool), jnp.ndarray(bool)) – The dense connection matrix.
- class neurai.nn.conn.connrule.FixedIndegree(degree, multi_conn=True)#
Bases:
Connector
Connects a fixed number of pre-population for each post-population neuron.
- class neurai.nn.conn.connrule.FixedOutdegree(degree, multi_conn=True)#
Bases:
Connector
Connect a fixed number of post-population for each pre-population neuron.
- class neurai.nn.conn.connrule.FixedProb(prob)#
Bases:
Connector
Connect the pre-population with the post-population with fixed probability.
- Parameters:
prob (float) – The connection probability of the pre-population to post-population.