norse.torch.functional.regularization.spike_accumulator#

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

A spike accumulator that aggregates spikes and returns the total sum as an integer.

Parameters:

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

Returns:

A new RegularizationState containing the aggregated data