CurrentProj

CurrentProj#

class brainpy.state.CurrentProj(*prefetch, comm, out, post)#

Current-based projection.

Delivers current input to post-synaptic neurons by passing the communication output through a synaptic output module (e.g., COBA or CUBA) and registering it as a current input on the post-synaptic population.

The update pipeline is:

  1. Optional pre-fetch modules transform the input.

  2. The communication module (comm) maps pre-synaptic activity.

  3. The synaptic output module (out) converts conductance to current and binds it to the post-synaptic neuron.

Parameters:
  • *prefetch – Optional pre-fetch modules. If provided, the last element must be a brainstate.nn.Prefetch or brainstate.nn.PrefetchDelayAt instance.

  • comm (Callable) – Communication module mapping pre-synaptic activity.

  • out (SynOut) – Synaptic output module that converts the communication result to post-synaptic current.

  • post (Dynamics) – Post-synaptic neural population.

Raises:

TypeError – If comm is not callable, out is not a SynOut, post is not a Dynamics, or the last prefetch module has an incorrect type.

See also

AlignPostProj

Projection with aligned synapse dynamics.

DeltaProj

Direct delta-input projection.

align_pre_projection

Convenience wrapper with pre-synaptic alignment.

Notes

  • The output module is immediately registered as a current input on the post-synaptic population at construction time.

  • Unlike AlignPostProj, this projection does not use synapse dynamics – the communication result is directly converted to current.

Examples

>>> import brainpy
>>> import brainstate
>>> import saiunit as u
>>> n_neurons = 100
>>> pop = brainpy.state.LIF(n_neurons, tau=10.*u.ms)
>>> pop.init_state()
>>> proj = brainpy.state.CurrentProj(
...     comm=brainstate.nn.Linear(n_neurons, n_neurons),
...     out=brainpy.state.CUBA(scale=u.volt),
...     post=pop,
... )
init_state(*args, **kwargs)[source]#

State initialization function.