Implementing SNN for NMNIST Dataset

588 views
Skip to first unread message

alish dipani

unread,
Feb 28, 2020, 4:27:30 AM2/28/20
to SpiNNaker Users Group
Hello,


NMNIST dataset has 34*34 images which have around 4500 events over around 350 ms of time. There are total 60000 training examples and 10000 testing examples.

The network has these populations:
1. Input population with 1156 neurons
2. Excitatory population with 100 neurons
3. Inhibitory population with 100 neurons

The connections are as follows:
1. All to All connections from input to excitatory population with STDP synapses (115600 connections)
2. One to One connections from excitatory to inhibitory population with static excitatory synapses (100 connections)
3. Static inhibitory Synapse connections from inhibitory to excitatory population where each neuron in inhibitory population is connected to each neuron in excitatory population except the one which is already connected (9900 connections)

For loading the dataset, I am using a SpikeSourceArray where the input is around 1156*4500 spikes per example (i.e. 1156 neurons each having around 4500 events in the time period of around 350 ms)

Currently, I am trying to run the network for 10 examples i.e. input array has 1156*4500*10 spikes and the simulation time is 500*10 ms (350ms for each example and 150 ms time for the variables to reset)
My query is that I'm getting the warning that the system is running too quickly and that the packets are lost. Please suggest a solution for this.

My time step is 0.1 ms and time scale factor is set to 10. I have tried increaing it to 100 and setting maximum neurons per core to 200 (using the set_number_of_neurons_per_core() function)
(Time step is set to a low amount as the precision of NMNIST dataset spike times is in microseconds)

Alternatively, are there any papers or code implementations of SNN models using NMNIST on SpiNNaker?

Thank you.

Warm Regards,
Alish Dipani

Petrut Bogdan

unread,
Feb 28, 2020, 8:25:33 AM2/28/20
to SpiNNaker Users Group
Hello Alish,

What problem are you encountering when trying to run this model?

We have some papers using MNIST rather than NMNIST (e.g. https://royalsocietypublishing.org/doi/full/10.1098/rsfs.2018.0007). In that paper, we had full control over the firing rate of the input neurons. The rates you quote for NMNIST seem rather high, especially considering the edges of MNIST digits are generally free of background activity. How are you reading in individual digits?

Cheers,
Peter

alish dipani

unread,
Mar 6, 2020, 2:29:56 AM3/6/20
to SpiNNaker Users Group
Dear Petrut,

Sorry for the late reply. I investigated the number of spikes and found a bug in my code. There are around 2000 spikes per example(for the whole input population of 1156 neurons). I have used time step as 1ms and time scale factor as 10.
However, my model is not working well, here are my doubts:

1. NMNIST dataset contains spike times in micro seconds but the SpikeSourceArray takes in input in milli seconds. Is there any way to have spike times in micro seconds? (I do understand that the time step would have to be reduced for this)
2. Can we monitor how much energy is being used using SpyNNaker?
3. Most of the weights in my model become zero just after a few examples, any idea why this might be happening?
4. The weights which are not zero are always a multiple of 0.0625, even if I set the initial weights to be not be a multiple of 0.0625, it gets rounded off to a multiple. Any idea why this might be happening?
5. gsyn_i for all of my neurons is always zero, any idea why this might be happening?

I have attached my code.

Thank you for your help.

Yours sincerely,
Alish Dipani
eventvision.py
SNN.ipynb

Petrut Bogdan

unread,
Mar 10, 2020, 5:13:59 AM3/10/20
to SpiNNaker Users Group
Hello Alish,

I have attached my results after modifying a few things. Could you please verify if these are the kinds of results you would expect?

> 1. NMNIST dataset contains spike times in micro seconds but the SpikeSourceArray takes in input in milli seconds. Is there any way to have spike times in micro seconds? (I do understand that the time step would have to be reduced for this)
This shouldn't be an issue. Times will be rounded to the nearest timestep, here 1 ms. You can run the model with a timestep of 0.1 ms as well.

> 2. Can we monitor how much energy is being used using SpyNNaker?
We have some means of estimating this in software. Some description of this should be in the documentation.

> 3. Most of the weights in my model become zero just after a few examples, any idea why this might be happening?
Without really looking into the specifics, I would generally expect this from additive STDP. While your rule doesn't seem to favour potentiation or depression, the time constant for potentiation is quite long and we might lose some accuracy with that. Do the results I attached suffer from what you're describing as well?

> 4. The weights which are not zero are always a multiple of 0.0625, even if I set the initial weights to be not be a multiple of 0.0625, it gets rounded off to a multiple. Any idea why this might be happening?
We have 16 bit of precision of weights. We perform some scaling to make sure that we can fit a certain number of spikes in each timestep with the maximum allowed weight. 0.0625 is probably, with the weight scaling the software is computing for you, the smallest representable value so all of your values would be multiples of it. Fixed point arithmetic is linear in its accuracy.

> 5. gsyn_i for all of my neurons is always zero, any idea why this might be happening?
The contribution from your inh -> exc projection (p.StaticSynapse(weight=0.0001,delay=1.0)) has a very low weight -- this might just be rounded to zero. Have you correctly converted the units involved here?

Do let me know if you require some additional support.

Cheers,
Peter
distribution_of_final_weights.png
distribution_of_initial_weights.png
spikes_v_gsyn.png
weight_difference_distribution.png
distribution_of_final_weights_non_zero.png

Muhammad Aitsam

unread,
Oct 5, 2022, 10:00:48 AM10/5/22
to SpiNNaker Users Group
hi,
I am also having similar issues. Accuracy is very bad.
Is it possible for you to share the changes you made in the code to the above results?

Can you explain the following things:
1) What do you mean by "Have you correctly converted the units involved here". which units you are talking about?
2) How to tune the parameters of the inhibitory layer and excitatory layer according to the task? maybe you can suggest appropriate documentation/
3)  In my case it seems like the Inhibitory layer is not inhibiting the excitatory layer (lateral inhibition is not happening). How can I overcome this issue? increasing the weights will help?

Andrew Gait

unread,
Oct 11, 2022, 4:23:28 AM10/11/22
to Muhammad Aitsam, SpiNNaker Users Group
Hi,

This is from a few years ago, and Petrut is no longer working with us, but I'll have a go at answering your questions:

1) this answer is related to the g_syn_i always being zero - the answer is that either the weight on that projection is too small, or that some value of the neuron parameters relating to inhibition (eg. perhaps tau_syn_I) aren't set at a value where an effect can be seen.
2) parameter tuning is often just simply a case of rerunning your network having changed only one parameter and seeing whether this has any effect; I can't really suggest anything other than doing this as it more often than not depends on the specifics of your network.
3) if lateral inhibition is not taking place, then yes, the first thing to try is increasing the weights on the relevant projection.

If you need any more help then it might be more instructive if we could see the script / notebook you are trying to run and any data you need in order to run it.

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

From: spinnak...@googlegroups.com <spinnak...@googlegroups.com> on behalf of Muhammad Aitsam <aitsam...@gmail.com>
Sent: 05 October 2022 15:00
To: SpiNNaker Users Group <spinnak...@googlegroups.com>
Subject: [SpiNNaker Mailing List] Re: Implementing SNN for NMNIST Dataset
 
--
You received this message because you are subscribed to the Google Groups "SpiNNaker Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spinnakeruser...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/spinnakerusers/8e093198-1d68-4ca4-a638-8a4615ffce9dn%40googlegroups.com.

Muhammad Aitsam

unread,
Oct 12, 2022, 9:48:35 AM10/12/22
to SpiNNaker Users Group
Hi Andy,
Thank you for reply.
Here is the code. I am still tuning the parameters but it is taking ages. Kindly have a look at the code.


Regards,
Aitsam

Andrew Gait

unread,
Oct 13, 2022, 5:52:05 AM10/13/22
to Muhammad Aitsam, SpiNNaker Users Group
Hi,

I think there's something wrong with the Projections in your code, you have inp->exc, inp->inh and exc->inh, and then your inh->exc projection is commented out, so inh is not going to inhibit or affect anything.

Another possible issue I noticed was that for the inh neuron parameters, v_rest and v_thresh were both set to the same value; to me this seems a bit counterintuitive, but it may be deliberate if you're wanting a lot of inhibition to take place.

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

Sent: 12 October 2022 14:48

To: SpiNNaker Users Group <spinnak...@googlegroups.com>
Subject: Re: [SpiNNaker Mailing List] Re: Implementing SNN for NMNIST Dataset
 

Nelson Rodrigues

unread,
Nov 3, 2022, 12:23:58 PM11/3/22
to SpiNNaker Users Group
Hi Andrew,

I follow the script methodology, but for my use-case, basically the images (resolution) are different from the nmnist dataset. But when I tried to get the accuracy the excitatory neurons doesn't give me any data. I already check the spike array data and it seems correct but when I extract the spikes from the  excitatory neurons it doesn't give the information I need to extract some metrics. I also increase the weights to check if there will be more triggers from the neurons but again, I get no results.

Best regards,
Nelson

pipeline_stdp.ipynb

Andrew Gait

unread,
Nov 3, 2022, 1:17:41 PM11/3/22
to Nelson Rodrigues, SpiNNaker Users Group
Hi Nelson,

Thanks for the updated notebook.  Could you possibly also send (a link to) the data so I can try your notebook out myself to see what's going wrong?

Andrew

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

From: spinnak...@googlegroups.com <spinnak...@googlegroups.com> on behalf of Nelson Rodrigues <nrpr...@gmail.com>
Sent: 03 November 2022 16:23

Nelson Rodrigues

unread,
Nov 3, 2022, 4:01:10 PM11/3/22
to SpiNNaker Users Group
Hi Andrew,

Sure. The data basically has only two classes (0 and 1). In each file attach you will found the the splits which I use for my events, each split has 30ms of data.
The path now stays like this:
num_classes = 2
training_data_lists = [os.listdir(os.getcwd()+"/"+str(i)+"/") for i in range(num_classes)]

Thank you,
Nelson

1.rar
0.rar

Nelson Rodrigues

unread,
Nov 10, 2022, 10:44:33 AM11/10/22
to SpiNNaker Users Group
Hi Andrew,

Stranger things are happen in my network, I check the data for the nmnist dataset using two classes only and the excitatory neurons could give me data. When I use the same methodology for my data which also have two classes but with different resolution (256x256 instead of 34x34 of nmnist), I get the following error on extracting the spikes from the excitatory neurons:

error.PNG

I think this is could be the issue, although I don't know how to solve it!

Best Regards,
Nelson

Andrew Gait

unread,
Nov 10, 2022, 12:22:30 PM11/10/22
to Nelson Rodrigues, SpiNNaker Users Group
Hi Nelson,

I've just had a chance to run your network with the files you sent (looks like the Manchester server didn't like them but I'm also subscribed on a different email and that was fine...), and based on those files I'm able to run your notebook without it having any problems.  How are you running the notebook - are you using our Jupyter server and if so which kernel are you using when running?

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

From: spinnak...@googlegroups.com <spinnak...@googlegroups.com> on behalf of Nelson Rodrigues <nrpr...@gmail.com>
Sent: 10 November 2022 15:44

To: SpiNNaker Users Group <spinnak...@googlegroups.com>
Subject: Re: [SpiNNaker Mailing List] Re: Implementing SNN for NMNIST Dataset
--
You received this message because you are subscribed to the Google Groups "SpiNNaker Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spinnakeruser...@googlegroups.com.

Nelson Rodrigues

unread,
Nov 10, 2022, 2:35:35 PM11/10/22
to SpiNNaker Users Group
Hi Andrew,

Yes, I'm running on the Jupyter server using the sPynnaker kernel. Idon't have any problem on running the script, the problem is from getting spikes from the excitatory neurons.

Thanks

Andrew Rowley

unread,
Nov 11, 2022, 3:14:40 AM11/11/22
to Nelson Rodrigues, SpiNNaker Users Group

Hi,

 

It is possible that you have an out-of-date system.  Can you tell us your username and we can have a look?

 

Thanks,

 

Andrew :)

 

Hi Andrew,

 

 

I think this is could be the issue, although I don't know how to solve it!

Best Regards,
Nelson

On Thursday, 3 November 2022 at 20:01:10 UTC Nelson Rodrigues wrote:

Hi Andrew,

 

Sure. The data basically has only two classes (0 and 1). In each file attach you will found the the splits which I use for my events, each split has 30ms of data.
The path now stays like this:

num_classes = 2
training_data_lists = [os.listdir(os.getcwd()+"/"+str(i)+"/") for i in range(num_classes)]

Thank you,
Nelson

--
You received this message because you are subscribed to the Google Groups "SpiNNaker Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spinnakeruser...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "SpiNNaker Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spinnakeruser...@googlegroups.com.

Nelson Rodrigues

unread,
Nov 11, 2022, 4:54:17 AM11/11/22
to SpiNNaker Users Group
Hi,

My username is id8323.

Thanks,
Nelson

Andrew Rowley

unread,
Nov 11, 2022, 5:00:18 AM11/11/22
to Nelson Rodrigues, SpiNNaker Users Group

Hi,

 

It looks like you and Andy are definitely using the same version of the docker image.  Provided nothing has changed in the kernel it should be the same… 

 

Andrew :)

 

Andrew Gait

unread,
Nov 11, 2022, 5:06:42 AM11/11/22
to Andrew Rowley, Nelson Rodrigues, SpiNNaker Users Group
Hi Nelson,

Just so we're certain we're testing the same thing, can you send the notebook you're currently testing again, just in case there are any differences between that and what you previously sent?

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

From: spinnak...@googlegroups.com <spinnak...@googlegroups.com> on behalf of Andrew Rowley <Andrew...@manchester.ac.uk>
Sent: 11 November 2022 10:00
To: Nelson Rodrigues <nrpr...@gmail.com>; SpiNNaker Users Group <spinnak...@googlegroups.com>
Subject: RE: [SpiNNaker Mailing List] Re: Implementing SNN for NMNIST Dataset
 

Nelson Rodrigues

unread,
Nov 11, 2022, 5:07:59 AM11/11/22
to SpiNNaker Users Group
Hi,

Thanks Andrew, so the issue could be on the network setup? Is very strange when I'm using the MNMIST dataset I can extract the spikes from the excitatory neurons and when I'm using my data it doesn't give me anything. The only difference on the data is the size of the image and the amount of events, but the principle is the same. I can't understand the reason why the population of excitatory and inhibitory is losing data when I simulate.

Nelson

Nelson Rodrigues

unread,
Nov 11, 2022, 5:11:27 AM11/11/22
to SpiNNaker Users Group
Hi Andrew,

Sure, please use this script, and the data that is on .rar.

Regards,
Nelson

data.rar
pipeline_stdp_square.ipynb

Andrew Gait

unread,
Nov 11, 2022, 5:23:01 AM11/11/22
to Nelson Rodrigues, SpiNNaker Users Group
Hi - not sure that's the correct data for the notebook you sent as there only appear to be two files in the .rar (named 16.pkl and 17.pkl).

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

Sent: 11 November 2022 10:11

Nelson Rodrigues

unread,
Nov 11, 2022, 6:42:33 AM11/11/22
to SpiNNaker Users Group
Hi,

Yes, no problem. Each class (0 and 1) has two files, each file is 30ms of events of a particular action, I just put two files for each class to validate, my batch_size is two. In the notebook you can skip the part where I'm converting the events, so basically you can start from the cell where I define the number_of_classes.

Nelson

Andrew Gait

unread,
Nov 11, 2022, 7:18:34 AM11/11/22
to Nelson Rodrigues, SpiNNaker Users Group
OK - I still don't quite understand.  I have made two directories "0" and "1", and I have copied the files 16.pkl and 17.pkl that you sent into each of them.  Then after changing the notebook following what you said earlier in the thread, I am able to run your notebook and I don't get any errors when extracting the Excitatory (or Inhibitory) spikes.

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

Sent: 11 November 2022 11:42

Nelson Rodrigues

unread,
Nov 11, 2022, 10:44:53 AM11/11/22
to SpiNNaker Users Group
Hi Andrew,

I also didn't get any error, although I don't get any spikes from it. As you can see from the following image:
exc_spikes.PNG
Also when I extract the data I get an warning which says that I may lose spike data from the simulation.
extract_data.PNG

Nelson

Andrew Gait

unread,
Nov 11, 2022, 12:06:08 PM11/11/22
to Nelson Rodrigues, SpiNNaker Users Group
Yes, I don't see any spikes either, but I also don't see the warning messages.  I wonder whether it may be worth you trying a run using the sPyNNakerGit kernel instead...

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

Sent: 11 November 2022 15:44

Nelson Rodrigues

unread,
Nov 11, 2022, 12:56:46 PM11/11/22
to SpiNNaker Users Group
Hi Andrew,

I try to running on the spinnakergit kernel, and the results are the same. I think it may be the network setup (the neurons parameters), although I don't know how to adjust them.

Nelson

Andrew Gait

unread,
Nov 14, 2022, 6:20:34 AM11/14/22
to Nelson Rodrigues, SpiNNaker Users Group
Hi Nelson,

Running using sPyNNakerGit does give me some spikes.  I had to also alter the beginning of the class selector loop in order to load the correct files to the following:

for clas in class_selector:
    image = np.zeros((256,256,3), np.uint8)
    data_point = [[] for _ in range(256*256)]
#     pickle_file = os.getcwd()+"/events/polarity_positive/"+file+"/splits_square/"+str(clas)+"/"+str(training_data_lists[clas][num_examples_seen[clas]])
    pickle_file = os.getcwd()+"/"+str(clas)+"/"+str(training_data_lists[clas][num_examples_seen[clas]])

(i.e. comment out the current "pickle_file" line and replace it with something similar to what you said earlier in the thread for the set of data you sent).

It may also be that your sPyNNakerGit kernel is further behind the git version than mine is.  If you want to update it then do the following steps:

Open a terminal window in Jupyter, then on the command line:
cd sPyNNakerGit
source bin/activate
bash support/gitpull.sh
bash support/automatic_make.sh

Once you have done this and there are no errors try running your notebook again and see if there are now any recorded spikes.

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours
Sent: 11 November 2022 17:56

Nelson Rodrigues

unread,
Nov 14, 2022, 8:26:15 AM11/14/22
to SpiNNaker Users Group
Hi Andrew,

For some reason I can't find the support/gitpull.sh. I can activate the environment and compile with the automatic_make.sh but no sucess to find the gitpull.sh.

Nelson

Andrew Rowley

unread,
Nov 14, 2022, 8:29:57 AM11/14/22
to Nelson Rodrigues, SpiNNaker Users Group

Hi,

 

It may be that your support folder is old enough not to have it.  In that case first try:

cd sPyNNakerGit/support

git pull

 

(The last command is not a single script).

 

Then you should be able to try again from sPyNNakerGit.

 

Andrew :)

 

Also when I extract the data I get an warning which says that I may lose spike data from the simulation.

Nelson Rodrigues

unread,
Nov 14, 2022, 9:00:27 AM11/14/22
to SpiNNaker Users Group
Hi Andrew,

Thank you, now I can update the kernel. I restart the kernel and run the notebook although with no success on get the spikes from the excitatory neurons. Also I'm getting this error when I terminate the simulation:

error.PNG

Nelson

Andrew Gait

unread,
Nov 14, 2022, 9:06:29 AM11/14/22
to Nelson Rodrigues, SpiNNaker Users Group
Hi Nelson - what do your input and inhibitory neuron spikes look like now?

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

Sent: 14 November 2022 14:00

Nelson Rodrigues

unread,
Nov 14, 2022, 9:41:34 AM11/14/22
to SpiNNaker Users Group
Hi Andrew,

The input neuron spikes, always give data. But the excitatory and inhibitory neurons doesn´t. So the error persist. I would like to see what you get from the excitatory spikes, could you send me that data, or a print of it?

Nelson :)

Andrew Gait

unread,
Nov 14, 2022, 11:06:57 AM11/14/22
to Nelson Rodrigues, SpiNNaker Users Group
Hi Nelson,

Here's the figures I get when running your notebook.

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

Sent: 14 November 2022 14:41
Nelson_spikes.png
Nelson_weightdiff.png

Nelson Rodrigues

unread,
Nov 14, 2022, 12:05:27 PM11/14/22
to SpiNNaker Users Group
Hi Andrew,

Yah, that's at I suppose to get. You are running the spinnakergit or spinnaker kernel? Also, the setup has a time_scale_factor is equal to 100 and you set_number_of_neurons_per_core?

Nelson

Andrew Gait

unread,
Nov 15, 2022, 4:11:06 AM11/15/22
to Nelson Rodrigues, SpiNNaker Users Group
Hi Nelson,

I was using the sPyNNakerGit kernel.  I hadn't changed the time_scale_factor from what you sent, so it was equal to 1000 for the graphs I sent you. However, it still works after changing it to 100. set_number_of_neurons_per_core sets the neurons per core for the SpikeSourceArray to "neurons//8".

I would also note from your script that the delay on one of the projections is set to 0.1, but the overall timestep value is 1.0.  A delay can't be shorter than a single timestep, so this delay value will be automatically change from 0.1 to 1.0.

I would further note that your initial weight random distribution in the stdp model will give you initial weights larger than the max weight value in the STDP rule. I don't believe this should cause any particular problems but as it has probably never been tested I would suggest changing the max of either the STDP rule or the random distribution so that they match each other.

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

Sent: 14 November 2022 17:05

Nelson Rodrigues

unread,
Nov 17, 2022, 5:49:18 AM11/17/22
to SpiNNaker Users Group
Hi Andrew,

I made those changes in the weights but still I'm losing data from the excitatory and inhibitory neurons, which is weird because I update the kernel (spinnakergit) version, so the results should be the same. Could be possible that I have some limitations when I perform my simulations?

Nelson

Andrew Gait

unread,
Nov 21, 2022, 12:07:13 PM11/21/22
to Nelson Rodrigues, SpiNNaker Users Group
Hi Nelson,

It's possible but it's more likely that there was an error somewhere that you haven't noticed.  All I can suggest is that you run the steps again to update:

cd sPyNNakerGit
source bin/activate
bash support/gitpull.sh
bash support/automatic_make.sh

Particularly in the last two scripts, make sure there are no errors in any of the output before continuing.  If you do see errors and you don't know how to fix them, post them here and we'll work it out.

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

Sent: 17 November 2022 10:49

Nelson Rodrigues

unread,
Nov 22, 2022, 5:01:01 AM11/22/22
to SpiNNaker Users Group
Hi Andrew,

I update again the spinnakergit kernel, run the simulation and I get the following error:
error.PNG

Nelson

Andrew Gait

unread,
Nov 22, 2022, 5:14:19 AM11/22/22
to Nelson Rodrigues, SpiNNaker Users Group
Hi Nelson,

Didn't realise you were using Java (or that Java was turned on by default, one or the other).  You probably need to rebuild that too - so do the following in a terminal

cd sPyNNakerGit
source bin/activate

(only need to do this if you're not in the sPyNNakerGit kernel already).  Then do

cd JavaSpiNNaker
mvn package

Hopefully that will build successfully, then you can try your notebook again.

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

Sent: 22 November 2022 10:01

Nelson Rodrigues

unread,
Nov 22, 2022, 8:12:16 AM11/22/22
to SpiNNaker Users Group
Hi Andrew,

Finally I got results! I build successfully and now I can extract the excitatory spikes from my network. Although I got this warning:
error.PNG

It still missing data, but at least it gives me something.

Nelson

Andrew Gait

unread,
Nov 22, 2022, 8:22:33 AM11/22/22
to Nelson Rodrigues, SpiNNaker Users Group
Hi Nelson,

Glad to hear you finally got some results.

The warning you are seeing there isn't to do with missing data - what it's telling you is how many times the weights along a particular synaptic connection saturated (i.e. reached the maximum the software can deal with). This happens most often when you have multiple connections coming into the same neuron at the same time; possible ways around this are to look at whether this connectivity can be reduced, or alternatively reduce the weight values you are setting in Projections (or the max weight value if you are using STDP0.

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

Sent: 22 November 2022 13:12

Nelson Rodrigues

unread,
Nov 22, 2022, 10:08:02 AM11/22/22
to SpiNNaker Users Group
Hi Andrew,

Another issue, previously when I'm using the older version of the kernel I can plot my data, although now I'm getting this error:
error.PNG

Is it possible there's a incompability between pynn.plotting and this specific kernel?

Nelson

Andrew Gait

unread,
Nov 22, 2022, 11:52:14 AM11/22/22
to Nelson Rodrigues, SpiNNaker Users Group
Hi Nelson,

That's a strange one - what versions of pyNN and neo are you using?

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

Sent: 22 November 2022 15:08

Nelson Rodrigues

unread,
Nov 22, 2022, 2:36:10 PM11/22/22
to SpiNNaker Users Group
Hi Andrew,

The PyNN == 0.9.6, Neo == 0.11.0 for the spinnakergit kernel. When I'm using the spinnaker kernel the versions are PyNN == 0.9.6, Neo == 0.9.0. So maybe I should downgrade the Neo version right?

Nelson

Andrew Gait

unread,
Nov 23, 2022, 2:49:02 AM11/23/22
to Nelson Rodrigues, SpiNNaker Users Group
Hi Nelson - yes, downgrade the Neo version.  I don't think we've (yet) fully tested/integrated Neo 0.10.0 let alone 0.11.0 so probably safest to downgrade to 0.9.

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

Sent: 22 November 2022 19:36

Nelson Rodrigues

unread,
Nov 28, 2022, 6:25:39 AM11/28/22
to SpiNNaker Users Group
Hi Andrew,

Yes now it works. Although the precision and recall are low, but that's another issue. I have one question: Is it possible to write an energy report in a simulation? Because I don't have a physical machine, and I would like to now the energy consumption of my network.

Nelson

Andrew Gait

unread,
Nov 28, 2022, 6:37:23 AM11/28/22
to Nelson Rodrigues, SpiNNaker Users Group
Hi Nelson,

We have energy reporting, but it isn't done by default and we need to do some work on it to make it more accurate.  However, if you want to get a rough idea of what energy a job has used, you need to add the following to your .spynnaker.cfg file (in the top level directory when you open a new terminal):

[Reports]
write_energy_report = True

Once you've done that and run a notebook, from the directory the notebook is located in you need to go into the file "reports/<date-time-stamp>/run_1", (<date-time-stamp> being the date and time when the job was run) where you should be able to see both "summary_energy_report.rpt" (for the whole job) and "detailed_energy_report.rpt" (which should break it down to numbers for each core/chip used in the simulation).

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

Sent: 28 November 2022 11:25
Reply all
Reply to author
Forward
0 new messages