jaxsnn.discrete.modules.leaky_integrate_and_fire

Classes

LIFInput(I, z)

LIFParameters(tau_syn, tau_mem, v_th, …)

LIFState(z, v, i)

State of a LIF neuron

partial

partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords.

Functions

jaxsnn.discrete.modules.leaky_integrate_and_fire.LIF(out_dim, method=<jax._src.custom_derivatives.custom_vjp object>, scale_in=0.7, scale_rec=0.2)

Layer constructor function for a lif (leaky-integrated-fire) layer.

jaxsnn.discrete.modules.leaky_integrate_and_fire.NamedTuple(typename, fields=None, /, **kwargs)

Typed version of namedtuple.

Usage:

class Employee(NamedTuple):
    name: str
    id: int

This is equivalent to:

Employee = collections.namedtuple('Employee', ['name', 'id'])

The resulting class has an extra __annotations__ attribute, giving a dict that maps field names to types. (The field names are also in the _fields attribute, which is part of the namedtuple API.) An alternative equivalent functional syntax is also accepted:

Employee = NamedTuple('Employee', [('name', str), ('id', int)])
jaxsnn.discrete.modules.leaky_integrate_and_fire.lif_step(init, spikes, method=<jax._src.custom_derivatives.custom_vjp object>, params: jaxsnn.base.params.LIFParameters = LIFParameters(tau_syn=0.005, tau_mem=0.01, v_th=0.6, v_leak=0.0, v_reset=0.0), dt=0.001)