norse.torch.functional.regularization.spike_accumulator#
- norse.torch.functional.regularization.spike_accumulator(z: Tensor, _: Any, state: Tensor | None = 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