SpiNNakerManchester / sPyNNaker

The SpiNNaker implementation of the PyNN neural networking language
Apache License 2.0
105 stars 44 forks source link

process deferred changes at the end of a run/ before a read #1492

Open Christian-B opened 1 month ago

Christian-B commented 1 month ago

follow up to https://github.com/SpiNNakerManchester/sPyNNaker/pull/1490

When playing with changeable and changer Projections I was confused because some of the Changer spikes where not reflected in the changeable's weights.

This is because the changer spiker(s) which happened the last changable spike was processed where deffered (not yet processed)

I think some STDP models also have this deferring behaviour

rowleya commented 1 month ago

Weight changes that have not yet happened because the processing is deferred until a pre-spike is received could be processed at the end of simulation. This could be slow, but it can be done at a time when speed is not critical.

For STDP, this would have to go through each pre row and find the last pre-spike time, then go through the post spike history and make the appropriate potentiations since the last pre-spike. This might require a small amount of extra data to be available, in terms of the start address of the matrix for the specific STDP connection, and the row length.

For WeightChangable, the history buffers include the pre spike index in some form, although this is in addition to an offset value, so the start address and row length would be needed in addition to this offset address. However processing would not require every row to be looked at, only those mentioned in the history.