jaxsnn.discrete.functional.li

Classes

BaseState()

Base class for all neuron states across paradigms

DenseData

alias of jax.Array

LIParameters(tau_syn, tau_mem, v_leak)

LIState(V, I)

Parameter

alias of jax.Array

Functions

jaxsnn.discrete.functional.li.dataclass(cls=None, /, *, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=False, weakref_slot=False)

Add dunder methods based on the fields defined in the class.

Examines PEP 526 __annotations__ to determine fields.

If init is true, an __init__() method is added to the class. If repr is true, a __repr__() method is added. If order is true, rich comparison dunder methods are added. If unsafe_hash is true, a __hash__() method is added. If frozen is true, fields may not be assigned to after instance creation. If match_args is true, the __match_args__ tuple is added. If kw_only is true, then by default all fields are keyword-only. If slots is true, a new class with a __slots__ attribute is returned.

jaxsnn.discrete.functional.li.li_step(inputs: Dict[str, jax.Array], state: jaxsnn.discrete.functional.li.LIState, parameters: Optional[jax.Array, None], v_leak: float, tau_mem: float, tau_syn: float, dt: float)Tuple[jaxsnn.discrete.functional.li.LIState, jax.Array]

Euler step of a leaky integrate neuron.

Parameters
  • inputs – Dictionary of input currents

  • state – Current neuron state

  • parameters – Optional learnable parameters

  • v_leak – Leak potential

  • tau_mem – Membrane time constant

  • tau_syn – Synaptic time constant

  • dt – Time step size

Returns

Tuple of updated neuron state and membrane potential

jaxsnn.discrete.functional.li.tree_reduce(function: Callable[[T, Any], T], tree: Any, *, is_leaf: Optional[Callable[[Any], bool], None] = 'None')T
jaxsnn.discrete.functional.li.tree_reduce(function: Callable[[T, Any], T], tree: Any, initializer: T, is_leaf: Optional[Callable[[Any], bool], None] = None)T