norse.torch.functional.regularization.voltage_accumulator

norse.torch.functional.regularization.voltage_accumulator(z: torch.Tensor, s: Any, state: Optional[torch.Tensor] = None)int[source]

A spike accumulator that aggregates membrane potentials over time. Requires that the input state s has a v property (for voltage).

Parameters:

z (torch.Tensor): Spikes from some cell s (Any): Cell state state (Optional[torch.Tensor]): The regularization state to be aggregated to. Defaults to zeros for all entries.

Returns:

A new RegularizationState containing the aggregated data