Implementing Regression Model

Hello @ssp, not all the neurons are supposed to spike for any random test image. Few of them in a layer will spike, few won’t. So when you are choosing 100 neurons, you aren’t guaranteed to see firing rate for all the neurons. I am also a bit confused about how you are calculating the percentage firing rate? Firing rates are in Hz, and they generally don’t have an upper bound for the SpikingRectifiedLinear() neuron (as they can spike more than once in a timestep). Therefore it make more sense to plot them in raw values i.e. in Hz.

I am attaching a minimal script where you can see how I have plotted the firing rates of 100 random neurons (where each of them have spiked for the first input test image). Once you choose test_image_index (in the attached jupyter notebook) you can set the target image and identify which neurons have spiked for it.

I would highly encourage you to tinker through the attached notebook, and try experimenting with it. Feel free to ask any doubts.
visualizing_firing_rates.ipynb (69.4 KB)