jaxsnn.discrete.modules.lif
Classes
alias of |
|
|
|
|
|
alias of |
|
|
A population module for the discrete paradigm. |
Functions
-
jaxsnn.discrete.modules.lif.LIF(size, params: jaxsnn.discrete.functional.lif.LIFParameters = LIFParameters(tau_syn=0.005, tau_mem=0.01, v_th=0.6, v_leak=0.0, v_reset=0.0), method: Callable = <jax._src.custom_derivatives.custom_vjp object>) → jaxsnn.discrete.types.Population Layer constructor function for a leaky-integrate and fire layer.
- Parameters
size – Number of neurons in the layer.
params – Parameters for the LIF neuron model.
method – Surrogate gradient method for the threshold function.
- Returns
A Population object containing the layer definition.
-
jaxsnn.discrete.modules.lif.lif_step(inputs: Dict[str, jax.Array], state: jaxsnn.discrete.functional.lif.LIFState, parameters: Optional[jax.Array, None], method: Callable, v_leak: float, v_th: float, v_reset: float, tau_mem: float, tau_syn: float, dt: float = 0.001) → Tuple[jaxsnn.discrete.functional.lif.LIFState, jax.Array] Euler step of a leaky-integrate-and-fire neuron.
- Parameters
inputs – Dictionary of input currents
state – Current neuron state
parameters – Optional learnable parameters
method – Surrogate gradient method for the threshold function
v_leak – Leak potential
v_th – Threshold potential
v_reset – Reset potential
tau_mem – Membrane time constant
tau_syn – Synaptic time constant
dt – Time step size
- Returns
Tuple of updated neuron state and membrane potential