norse.torch.functional.izhikevich module

class norse.torch.functional.izhikevich.IzhikevichParameters(a: float, b: float, c: float, d: float, sq: float = 0.04, mn: float = 5, bias: float = 140, v_th: float = 30, tau_inv: float = 250, method: str = 'super', alpha: float = 100.0)[source]

Bases: tuple

Parametrization of av Izhikevich neuron :param a: time scale of the recovery variable u. Smaller values result in slower recovery in 1/ms :type a: float :param b: sensitivity of the recovery variable u to the subthreshold fluctuations of the membrane potential v. Greater values couple v and u more strongly resulting in possible subthreshold oscillations and low-threshold spiking dynamics :type b: float :param c: after-spike reset value of the membrane potential in mV :type c: float :param d: after-spike reset of the recovery variable u caused by slow high-threshold Na+ and K+ conductances in mV :type d: float :param sq: constant of the v squared variable in mV/ms :type sq: float :param mn: constant of the v variable in 1/ms :type mn: float :param bias: bias constant in mV/ms :type bias: float :param v_th: threshold potential in mV :type v_th: torch.Tensor :param tau_inv: inverse time constant in 1/ms :type tau_inv: float :param method: method to determine the spike threshold

(relevant for surrogate gradients)

Parameters

alpha (float) – hyper parameter to use in surrogate gradient computation

Create new instance of IzhikevichParameters(a, b, c, d, sq, mn, bias, v_th, tau_inv, method, alpha)

a: float

Alias for field number 0

alpha: float

Alias for field number 10

b: float

Alias for field number 1

bias: float

Alias for field number 6

c: float

Alias for field number 2

d: float

Alias for field number 3

method: str

Alias for field number 9

mn: float

Alias for field number 5

sq: float

Alias for field number 4

tau_inv: float

Alias for field number 8

v_th: float

Alias for field number 7

class norse.torch.functional.izhikevich.IzhikevichRecurrentState(z: torch.Tensor, v: torch.Tensor, u: torch.Tensor)[source]

Bases: tuple

State of a Izhikevich neuron :param v: membrane potential :type v: torch.Tensor :param u: membrane recovery variable :type u: torch.Tensor

Create new instance of IzhikevichRecurrentState(z, v, u)

u: torch.Tensor

Alias for field number 2

v: torch.Tensor

Alias for field number 1

z: torch.Tensor

Alias for field number 0

class norse.torch.functional.izhikevich.IzhikevichSpikingBehavior(p: norse.torch.functional.izhikevich.IzhikevichParameters, s: norse.torch.functional.izhikevich.IzhikevichState)[source]

Bases: tuple

Spiking behavior of a Izhikevich neuron :param p: parameters of the Izhikevich neuron model :type p: IzhikevichParameters :param s: state of the Izhikevich neuron model :type s: IzhikevichState

Create new instance of IzhikevichSpikingBehavior(p, s)

p: norse.torch.functional.izhikevich.IzhikevichParameters

Alias for field number 0

s: norse.torch.functional.izhikevich.IzhikevichState

Alias for field number 1

class norse.torch.functional.izhikevich.IzhikevichState(v: torch.Tensor, u: torch.Tensor)[source]

Bases: tuple

State of a Izhikevich neuron :param v: membrane potential :type v: torch.Tensor :param u: membrane recovery variable :type u: torch.Tensor

Create new instance of IzhikevichState(v, u)

u: torch.Tensor

Alias for field number 1

v: torch.Tensor

Alias for field number 0

norse.torch.functional.izhikevich.create_izhikevich_spiking_behavior(a, b, c, d, v_rest, u_rest, tau_inv=250)[source]

A function that allows for the creation of custom Izhikevich neurons models, as well as a visualization of their behavior on a 250 ms time window :type a: float :param a: time scale of the recovery variable u. Smaller values result in slower recovery in 1/ms :type a: float :type b: float :param b: sensitivity of the recovery variable u to the subthreshold fluctuations of the membrane potential v. Greater values couple v and u more strongly resulting in possible subthreshold oscillations and low-threshold spiking dynamics :type b: float :type c: float :param c: after-spike reset value of the membrane potential in mV :type c: float :type d: float :param d: after-spike reset of the recovery variable u caused by slow high-threshold Na+ and K+ conductances in mV :type d: float :type v_rest: float :param v_rest: resting value of the v variable in mV :type v_rest: float :type u_rest: float :param u_rest: resting value of the u variable :type u_rest: float :type tau_inv: float :param tau_inv: inverse time constant in 1/ms :type tau_inv: float :param current: input current :type current: float :param time_print: size of the time window in ms :type time_print: float :param timestep_print: timestep of the simulation in ms :type timestep_print: float

Return type

IzhikevichSpikingBehavior

norse.torch.functional.izhikevich.izhikevich_recurrent_step(input_current, s, input_weights, recurrent_weights, p, dt=0.001)[source]
Return type

Tuple[Tensor, IzhikevichRecurrentState]

norse.torch.functional.izhikevich.izhikevich_step(input_current, s, p, dt=0.001)[source]
Return type

Tuple[Tensor, IzhikevichState]