Energy consumption / Maximum number of spikes


How could we measure the Energy consumption of a SNN model?
And, How to calculate the Maximum number of spikes?


We have some support for estimating model energy with the ModelEnergy class in KerasSpiking.

There are two ways to compute the maximum number of spikes:

  1. Pass many examples from your dataset through the model, and count spikes.
  2. Find a theoretical maximum by looking at the weights, and finding the inputs that would maximize the activations of the neurons. For example if you’ve got weights [-0.5, 0.5, 0.3] for a particular neuron, and your inputs can range between -1 to 1, then the maximal input is [-1, 1, 1] and the maximal input to the neuron model is 1.3, which you then need to pass through your neuron model to find the corresponding activation.

I prefer method 1, because it is both a bit easier and typically more practical, assuming you’ve got enough examples that you can be fairly confident that you won’t see any images in practice that will cause much larger activations.