norse.torch.functional.coba_lif module¶
- class norse.torch.functional.coba_lif.CobaLIFFeedForwardState(v: torch.Tensor, g_e: torch.Tensor, g_i: torch.Tensor)[source]¶
Bases:
tuple
State of a conductance based feed forward LIF neuron.
- Parameters
v (torch.Tensor) – membrane potential
g_e (torch.Tensor) – excitatory input conductance
g_i (torch.Tensor) – inhibitory input conductance
Create new instance of CobaLIFFeedForwardState(v, g_e, g_i)
- g_e: torch.Tensor¶
Alias for field number 1
- g_i: torch.Tensor¶
Alias for field number 2
- v: torch.Tensor¶
Alias for field number 0
- class norse.torch.functional.coba_lif.CobaLIFParameters(tau_syn_exc_inv: torch.Tensor = tensor(0.2000), tau_syn_inh_inv: torch.Tensor = tensor(0.2000), c_m_inv: torch.Tensor = tensor(5.), g_l: torch.Tensor = tensor(0.2500), e_rev_I: torch.Tensor = tensor(- 100), e_rev_E: torch.Tensor = tensor(60), v_rest: torch.Tensor = tensor(- 20), v_reset: torch.Tensor = tensor(- 70), v_thresh: torch.Tensor = tensor(- 10), method: str = 'super', alpha: float = 100.0)[source]¶
Bases:
tuple
Parameters of conductance based LIF neuron.
- Parameters
tau_syn_exc_inv (torch.Tensor) – inverse excitatory synaptic input time constant
tau_syn_inh_inv (torch.Tensor) – inverse inhibitory synaptic input time constant
c_m_inv (torch.Tensor) – inverse membrane capacitance
g_l (torch.Tensor) – leak conductance
e_rev_I (torch.Tensor) – inhibitory reversal potential
e_rev_E (torch.Tensor) – excitatory reversal potential
v_rest (torch.Tensor) – rest membrane potential
v_reset (torch.Tensor) – reset membrane potential
v_thresh (torch.Tensor) – threshold membrane potential
method (str) – method to determine the spike threshold (relevant for surrogate gradients)
alpha (float) – hyper parameter to use in surrogate gradient computation
Create new instance of CobaLIFParameters(tau_syn_exc_inv, tau_syn_inh_inv, c_m_inv, g_l, e_rev_I, e_rev_E, v_rest, v_reset, v_thresh, method, alpha)
- c_m_inv: torch.Tensor¶
Alias for field number 2
- e_rev_E: torch.Tensor¶
Alias for field number 5
- e_rev_I: torch.Tensor¶
Alias for field number 4
- g_l: torch.Tensor¶
Alias for field number 3
- tau_syn_exc_inv: torch.Tensor¶
Alias for field number 0
- tau_syn_inh_inv: torch.Tensor¶
Alias for field number 1
- v_reset: torch.Tensor¶
Alias for field number 7
- v_rest: torch.Tensor¶
Alias for field number 6
- v_thresh: torch.Tensor¶
Alias for field number 8
- class norse.torch.functional.coba_lif.CobaLIFState(z: torch.Tensor, v: torch.Tensor, g_e: torch.Tensor, g_i: torch.Tensor)[source]¶
Bases:
tuple
State of a conductance based LIF neuron.
- Parameters
z (torch.Tensor) – recurrent spikes
v (torch.Tensor) – membrane potential
g_e (torch.Tensor) – excitatory input conductance
g_i (torch.Tensor) – inhibitory input conductance
Create new instance of CobaLIFState(z, v, g_e, g_i)
- g_e: torch.Tensor¶
Alias for field number 2
- g_i: torch.Tensor¶
Alias for field number 3
- v: torch.Tensor¶
Alias for field number 1
- z: torch.Tensor¶
Alias for field number 0
- norse.torch.functional.coba_lif.coba_lif_feed_forward_step(input_tensor, state, p=CobaLIFParameters(tau_syn_exc_inv=tensor(0.2000), tau_syn_inh_inv=tensor(0.2000), c_m_inv=tensor(5.), g_l=tensor(0.2500), e_rev_I=tensor(- 100), e_rev_E=tensor(60), v_rest=tensor(- 20), v_reset=tensor(- 70), v_thresh=tensor(- 10), method='super', alpha=100.0), dt=0.001)[source]¶
Euler integration step for a conductance based LIF neuron.
- Parameters
input_tensor (torch.Tensor) – synaptic input
state (CobaLIFFeedForwardState) – current state of the neuron
p (CobaLIFParameters) – parameters of the neuron
dt (float) – Integration time step
- Return type
- norse.torch.functional.coba_lif.coba_lif_step(input_tensor, state, input_weights, recurrent_weights, p=CobaLIFParameters(tau_syn_exc_inv=tensor(0.2000), tau_syn_inh_inv=tensor(0.2000), c_m_inv=tensor(5.), g_l=tensor(0.2500), e_rev_I=tensor(- 100), e_rev_E=tensor(60), v_rest=tensor(- 20), v_reset=tensor(- 70), v_thresh=tensor(- 10), method='super', alpha=100.0), dt=0.001)[source]¶
Euler integration step for a conductance based LIF neuron.
- Parameters
input_tensor (torch.Tensor) – the input spikes at the current time step
s (CobaLIFState) – current state of the neuron
input_weights (torch.Tensor) – input weights (sign determines contribution to inhibitory / excitatory input)
recurrent_weights (torch.Tensor) – recurrent weights (sign determines contribution to inhibitory / excitatory input)
p (CobaLIFParameters) – parameters of the neuron
dt (float) – Integration time step
- Return type