jaxsnn.event.modules

Modules

jaxsnn.event.modules.hx

jaxsnn.event.modules.lif

jaxsnn.event.modules.linear

jaxsnn.event.modules.source

jaxsnn.event.modules.synapse

Classes

LIFParameters(tau_syn, tau_mem, v_th, …)

Functions

jaxsnn.event.modules.LIF(size: int, n_steps: int, params: jaxsnn.event.modules.lif.parameters.LIFParameters)jaxsnn.event.types.Population

Creates a LIF layer for event-based simulation and backpropagation. Returns a generator function that builds the layer based on input connections, delays, and chosen backpropagation strategy. Supports both forward-only simulation and custom backward passes (eventprop).

Parameters
  • size – Number of neurons in the layer.

  • n_steps – Number of event steps in the simulation.

  • params – Parameters for the LIF neuron dynamics.

Returns

A Population object containing the generator and parameters.

jaxsnn.event.modules.Linear(mean: float = 0.5, std: float = 2.0, min_delay: float = 0.0, pre_weights: Optional[jax.Array, None] = None)jaxsnn.event.types.Projection

Creates a Linear projection layer

Either:
  • initialize weights from a Gaussian (mean, std), or

  • provide a concrete weight array.

Parameters
  • mean – Mean of the Gaussian distribution for weight initialization.

  • std – Standard deviation of the Gaussian distribution.

  • min_delay – Minimum delay associated with this projection.

  • pre_weights – Optional weight array. If provided, mean and std are ignored.

Returns

A Projection object containing the generator and parameters.

jaxsnn.event.modules.Source(size: int)jaxsnn.event.types.SourcePopulation

Creates a Source population layer representing external input.

Parameters

size – Number of neurons/channels in the source layer.

Returns

A SourcePopulation object containing the generator and parameters.