Setting minimum and maximum firing rate of a LIF neuron


I am following the MNIST tutorial and I would like to set the minimum and maximum firing frequency of the LIF neurons.

The max_rates of a neuron is set as:
net.config[nengo.Ensemble].max_rates = nengo.dists.Choice([100])

Is there any way to set the minimum as well? What I mean to ask is that I want the neuron to have a firing frequency between an interval of let suppose 100 Hz to 200Hz.

Thank you for your reply in advance.

Hi @Choozi,

The neuron firing rates are chosen from the distribution provided to .max_rates. The nengo.dists.Choice([100]) distribution specifies that all sample points come from the array [100]. This is why all of the neurons have the same maximum firing rate of 100Hz. To set a range of values, you can provide a Uniform distribution instead, like so: nengo.dists.Uniform(100, 200). With this distribution, the neuron maximum firing rates will be chosen from a Uniform distribution between 100 and 200Hz.

Note that you can provide any distribution from nengo.dists. As an example, you can provide a Gaussian distribution, or even use the Choice distribution with multiple sample points between 100 and 200.

1 Like

Thank you very much for your help. :slight_smile:
I have been stuck with it for a while.