norse.torch.functional.regularization.voltage_accumulator(z: Tensor, s: Any, state: Optional[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).


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.


A new RegularizationState containing the aggregated data