[SOVLED] How to assign rate to poisson spike generator in an array-like style


#1

Dear All,

I have an SNN with 16 inputs. Therefore, in the transfer function, @MapSpikeSource, I define it like this:

@nrp.MapSpikeSource("img_data", nrp.brain.sensors[slice(0, 16, 1)], nrp.poisson)

I don’t know if I do it in the right way. This is the hard-coded way in the “Tigrillo Learning Experiment”

@nrp.MapSpikeSource("sensor_pop0", nrp.brain.sensor_population0, nrp.dc_source)
@nrp.MapSpikeSource("sensor_pop1", nrp.brain.sensor_population1, nrp.dc_source) 
@nrp.MapSpikeSource("sensor_pop2", nrp.brain.sensor_population2, nrp.dc_source)
@nrp.MapSpikeSource("sensor_pop3", nrp.brain.sensor_population3, nrp.dc_source)

And how can I index each Poisson spike generator in order to give its rates. something like this

img_data[0].rate = xxx

But it gives me error:

'PyNNNestPoissonSpikeGenerator' object does not support indexing

By the way, I have actually a trained working SNN built with NEST or pyNN. Can I use NEST functions in NRP Transferfunction?

Regards,
Zhenshan


#2

To anyone who may interest, this is solved by the inspiration from experiment “Holodeck hollie Arm Reinforcement-Learning for target reaching”. See details in “propagate_input_signal.py”

However, you should try both methods and compare them to insure the same results.
For my case, it is not exactly the same.


#3

Dear Zhenshan,

Thank you for your report. We are currently refiing the way that the populations are being accessed from the transfer functions, to make sure that also a slice of the population can be accessed. Keep track of the changelog, and it should be there in some time.

Regards,
Manos