nir.ir.neuron#

Module Contents#

Classes#

CubaLIF

Current based leaky integrate and-fire-neuron model.

I

Integrator.

IF

Integrate-and-fire neuron model.

LI

Leaky integrator neuron model.

LIF

Leaky integrate and-fire-neuron model.

class nir.ir.neuron.CubaLIF#

Bases: nir.ir.node.NIRNode

Current based leaky integrate and-fire-neuron model.

The current based leaky integrate-and-fire neuron model is defined by the following equations:

\[\tau_{syn} \dot {I} = - I + w_{in} S\]
\[\tau_{mem} \dot {v} = (v_{leak} - v) + R I\]
\[\begin{split}z = \begin{cases} 1 & v > v_{threshold} \\ 0 & else \end{cases}\end{split}\]
\[\begin{split}v = \begin{cases} v-v_{threshold} & z=1 \\ v & else \end{cases}\end{split}\]

Where \(\tau_{syn}\) is the synaptic time constant, \(\tau_{mem}\) is the membrane time constant, \(R\) is the resistance, \(v_{leak}\) is the leak voltage, \(v_{threshold}\) is the firing threshold, \(w_{in}\) is the input current weight (elementwise), and \(S\) is the input spike.

tau_syn: numpy.ndarray#
tau_mem: numpy.ndarray#
r: numpy.ndarray#
v_leak: numpy.ndarray#
v_threshold: numpy.ndarray#
w_in: numpy.ndarray = 1.0#
input_type: Optional[Dict[str, numpy.ndarray]]#
output_type: Optional[Dict[str, numpy.ndarray]]#
metadata: Dict[str, Any]#
__post_init__()#
class nir.ir.neuron.I#

Bases: nir.ir.node.NIRNode

Integrator.

The integrator neuron model is defined by the following equation:

\[\dot{v} = R I\]
r: numpy.ndarray#
input_type: Optional[Dict[str, numpy.ndarray]]#
output_type: Optional[Dict[str, numpy.ndarray]]#
metadata: Dict[str, Any]#
__post_init__()#
class nir.ir.neuron.IF#

Bases: nir.ir.node.NIRNode

Integrate-and-fire neuron model.

The integrate-and-fire neuron model is defined by the following equations:

\[\dot{v} = R I\]
\[\begin{split}z = \begin{cases} 1 & v > v_{thr} \\ 0 & else \end{cases}\end{split}\]
\[\begin{split}v = \begin{cases} v-v_{thr} & z=1 \\ v & else \end{cases}\end{split}\]
r: numpy.ndarray#
v_threshold: numpy.ndarray#
input_type: Optional[Dict[str, numpy.ndarray]]#
output_type: Optional[Dict[str, numpy.ndarray]]#
metadata: Dict[str, Any]#
__post_init__()#
class nir.ir.neuron.LI#

Bases: nir.ir.node.NIRNode

Leaky integrator neuron model.

The leaky integrator neuron model is defined by the following equation:

\[\tau \dot{v} = (v_{leak} - v) + R I\]

Where \(\tau\) is the time constant, \(v\) is the membrane potential, \(v_{leak}\) is the leak voltage, \(R\) is the resistance, and \(I\) is the input current.

tau: numpy.ndarray#
r: numpy.ndarray#
v_leak: numpy.ndarray#
input_type: Optional[Dict[str, numpy.ndarray]]#
output_type: Optional[Dict[str, numpy.ndarray]]#
metadata: Dict[str, Any]#
__post_init__()#
class nir.ir.neuron.LIF#

Bases: nir.ir.node.NIRNode

Leaky integrate and-fire-neuron model.

The leaky integrate-and-fire neuron model is defined by the following equations:

\[\tau \dot{v} = (v_{leak} - v) + R I\]
\[\begin{split}z = \begin{cases} 1 & v > v_{thr} \\ 0 & else \end{cases}\end{split}\]
\[\begin{split}v = \begin{cases} v-v_{thr} & z=1 \\ v & else \end{cases}\end{split}\]

Where \(\tau\) is the time constant, \(v\) is the membrane potential, \(v_{leak}\) is the leak voltage, \(R\) is the resistance, \(v_{threshold}\) is the firing threshold, and \(I\) is the input current.

tau: numpy.ndarray#
r: numpy.ndarray#
v_leak: numpy.ndarray#
v_threshold: numpy.ndarray#
input_type: Optional[Dict[str, numpy.ndarray]]#
output_type: Optional[Dict[str, numpy.ndarray]]#
metadata: Dict[str, Any]#
__post_init__()#