jaxsnn.event.solver.lif_analytical
Analytically find the time of the next spike for a LIF neuron for the special cases of $ au_mem = au_syn$ and $ au_mem = 2 * au_syn$.
When using jax.vmap to do this root solving in parallel, jax.lax.cond is mapped to jax.lax.switch, meaning that both branches are executed. Therefore, special care is taken to ensure that no NaNs occur, which would affect gradient calculation.
Classes
partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords. |
Functions
-
jaxsnn.event.solver.lif_analytical.ttfs_double_time(tau_mem: float, tau_syn: float, v_th: float, v_leak: float, state: jaxsnn.event.states.LIFState, t_max: float) → jax.Array
-
jaxsnn.event.solver.lif_analytical.ttfs_single_time(tau_mem: float, tau_syn: float, v_th: float, leak: float, state: jaxsnn.event.states.LIFState, t_max: float) → jax.Array
-
jaxsnn.event.solver.lif_analytical.ttfs_solver(tau_mem: float, tau_syn: float, v_th: float, leak: float) → Callable Find the next spike time for the special case tau_mem = tau_syn.
- Parameters
tau_mem – Membrane time constant
tau_syn – Synaptic time constant
v_th – Threshold voltage
leak – Leak term
- Returns
Time of next threshold crossing or t_max if no crossing