jaxsnn.event.solver.next_finder
Classes
Base class for all neuron states across paradigms |
|
|
Functions
-
jaxsnn.event.solver.next_finder.next_event(solver: Callable[[StateT, float], jaxsnn.event.types.Spike], neuron_state: jaxsnn.base.types.BaseState, time: jax.Array, t_max: float) → jaxsnn.event.types.Event Wraps a root solver to provide a cleaner API for returning next event.
- Parameters
solver – The actual root solver function.
neuron_state – The state of the neurons.
time – Current simulation time.
t_max – Maximum time of the simulation.
- Returns
Event object representing the spike which will occur next.
-
jaxsnn.event.solver.next_finder.next_queue(known_spikes: jaxsnn.event.types.Event, layer_start: int, neuron_state: jaxsnn.base.types.BaseState, time: float, t_max: float) → jaxsnn.event.types.Event Return the upcoming spike when training with hardware-in-the-loop.
When working with the BSS-2 system, we have all the spikes in advance and need to find the index and time of the next event. When the hardware spikes are bound to this function with functools.partial, it has the same API as next_event.
- Parameters
known_spikes – All spikes from BSS-2.
layer_start – Start index of the current layer.
neuron_state – The state of the neurons (unused).
time – Current simulation time.
t_max – Maximum simulation time.
- Returns
Event object representing the spike which will occur next in the layer.