brainpy.dyn.neurons.LIF
brainpy.dyn.neurons.LIF#
- class brainpy.dyn.neurons.LIF(size, V_rest=0.0, V_reset=- 5.0, V_th=20.0, tau=10.0, tau_ref=1.0, V_initializer=ZeroInit, noise=None, noise_type='value', keep_size=False, method='exp_auto', name=None)[source]#
Leaky integrate-and-fire neuron model.
Model Descriptions
The formal equations of a LIF model 1 is given by:
\[\begin{split}\tau \frac{dV}{dt} = - (V(t) - V_{rest}) + I(t) \\ \text{after} \quad V(t) \gt V_{th}, V(t) = V_{reset} \quad \text{last} \quad \tau_{ref} \quad \text{ms}\end{split}\]where \(V\) is the membrane potential, \(V_{rest}\) is the resting membrane potential, \(V_{reset}\) is the reset membrane potential, \(V_{th}\) is the spike threshold, \(\tau\) is the time constant, \(\tau_{ref}\) is the refractory time period, and \(I\) is the time-variant synaptic inputs.
Model Examples
- Parameters
size (sequence of int, int) – The size of the neuron group.
V_rest (float, JaxArray, ndarray, Initializer, callable) – Resting membrane potential.
V_reset (float, JaxArray, ndarray, Initializer, callable) – Reset potential after spike.
V_th (float, JaxArray, ndarray, Initializer, callable) – Threshold potential of spike.
tau (float, JaxArray, ndarray, Initializer, callable) – Membrane time constant.
tau_ref (float, JaxArray, ndarray, Initializer, callable) – Refractory period length.(ms)
V_initializer (JaxArray, ndarray, Initializer, callable) – The initializer of membrane potential.
noise (JaxArray, ndarray, Initializer, callable) – The noise added onto the membrane potential
noise_type (str) – The type of the provided noise. Can be value or func.
method (str) – The numerical integration method.
name (str) – The group name.
References
- 1
Abbott, Larry F. “Lapicque’s introduction of the integrate-and-fire model neuron (1907).” Brain research bulletin 50, no. 5-6 (1999): 303-304.
- __init__(size, V_rest=0.0, V_reset=- 5.0, V_th=20.0, tau=10.0, tau_ref=1.0, V_initializer=ZeroInit, noise=None, noise_type='value', keep_size=False, method='exp_auto', name=None)[source]#
Methods
__init__
(size[, V_rest, V_reset, V_th, tau, ...])get_delay_data
(name, delay_step, *indices)Get delay data according to the provided delay steps.
ints
([method])Collect all integrators in this node and the children nodes.
load_states
(filename[, verbose])Load the model states.
nodes
([method, level, include_self])Collect all children nodes.
register_delay
(name, delay_step, delay_target)Register delay variable.
register_implicit_nodes
(nodes)register_implicit_vars
(variables)reset
()Reset function which reset the whole variables in the model.
reset_delay
(name, delay_target)Reset the delay variable.
save_states
(filename[, variables])Save the model states.
train_vars
([method, level, include_self])The shortcut for retrieving all trainable variables.
unique_name
([name, type_])Get the unique name for this object.
update
(t, dt)The function to specify the updating rule.
update_delay
(name, delay_data)Update the delay according to the delay data.
vars
([method, level, include_self])Collect all variables in this node and the children nodes.
Attributes
global_delay_vars
name
steps