can we use FromListConnector() for multiple layers?

42 views
Skip to first unread message

Muhammad Aitsam

unread,
Aug 10, 2022, 10:33:42 AM8/10/22
to SpiNNaker Users Group

Hi,
I am kinda new in this field. Luckily I have SpiNNaker 5 board to do the experiments.
I used snntoolbox to convert ANN to SNN with NEURON simulator for MNIST dataset. By doing that, I got text files for each layer which contain these four columns (i, j, weight, delay).

I am using FromListConnector() in PyNN to use the txt file as connector, something like this:

stdp_proj = p.Projection(presynaptic_population = inp,
postsynaptic_population = exc,
connector = p.FromListConnector(txt file loaded by using numpy),
synapse_type = stdp_model,
receptor_type = 'excitatory'
)

I tried with 7Dense_10 layer for now and it worked but results are not really good (I don't know why). Question: is it possible to use multiple layers with FromListConnector()? If yes, then how? If No, then what are the ways to use this class efficiently?

Question 2: How to measure accuracy after running the SNN model on SpiNNaker? and how to measure power consumption and total time?

Thank you in advance.

Saurav Pawar

unread,
Aug 10, 2022, 2:38:55 PM8/10/22
to SpiNNaker Users Group
Hi,

Could you please share the steps that you took to convert your ANN to SNN using snntoolbox ?
Because I am also trying to achieve the same but facing some issues.

Thank you in advance.

Saurav

Saurav Pawar

unread,
Aug 11, 2022, 1:46:35 AM8/11/22
to SpiNNaker Users Group
Hi,

Maybe this can help you for getting the power consumption metrics (https://github.com/NeuromorphicProcessorProject/snn_toolbox/issues/99).

Saurav

Muhammad Aitsam

unread,
Aug 11, 2022, 6:36:52 AM8/11/22
to SpiNNaker Users Group
Hi,

I would recommend you to have a look at this video:

If you still face any problems then let me know.

Regards,
Aitsam

Edward Jones

unread,
Aug 11, 2022, 9:04:31 AM8/11/22
to SpiNNaker Users Group
This is quite a good way of getting parameters out from the snntoolbox, though I have never done in this way myself. Can you be more specific in what you mean when you say that the results aren't very good? Have you tried using static synapses instead of STDP ones? You can do multiple layers with FromListConnectors by using multiple connectors. As for question 2, as a first pass you can measure the total time by putting timing in your python code and counting the number of timesteps*time_scale_factor. Power consumption is a little more difficult. As for accuracy, you will have to think of a way of parsing the output from the model in a way that gives a class as an output and then compare this for a testing set of data.

Let me know if this makes sense.

Muhammad Aitsam

unread,
Oct 22, 2022, 12:01:43 PM10/22/22
to SpiNNaker Users Group
Hi again,

"As for accuracy, you will have to think of a way of parsing the output from the model in a way that gives a class as an output and then compares this for a testing set of data."

Can you elaborate on this statement more? 
Right now, I am able to train I am training my network for a batch of inputs and at the end of the simulation, I am able to get the final spiketrain and final weights. I am saving them in separate files. 
Now I want to test my network for another input (let's say input array from another class of MNIST dataset). How can I do that with the available spiketrain and weights of the trained model? 
My goal is to get the accuracy of my network.

Can you explain in detail what is the evaluation and testing process for SNNs? I'll be thankful to you.

Regards
Reply all
Reply to author
Forward
0 new messages