SpiNNakerManchester/sPyNNaker8

Reusing connector instances leads to unexpected behaviour

tophensen opened this issue · 2 comments

In PyNN 0.8 and 0.9 synapses and connectors are meant to be (almost) orthogonal properties of a projection. In spynnaker8, however, the weights and delays of, e.g., a StaticSynapse will modify the connector. This leads to unexpected behaviour if the same Connector instance is given to multiple different projections: The Projection handles last will determine the weights and delays of all Projections, because it is the same connector holding the weights and delays.

In the long run it might be worthwhile to separate Synapses and Connectors in sPyNNaker, but a short term fix would be to copy() the connector object before modifying any of its properties here:

connector.set_weights_and_delays(

I've been looking at this recently in #150 (which depends on SpiNNakerManchester/sPyNNaker#525) - this is waiting to be merged because there's a few other big changes coming, however if you want the correct behaviour when the same Connector is given to multiple Projections then these two branches should still work at the moment.

(Effectively this is a duplicate of SpiNNakerManchester/sPyNNaker#519 but we'll keep this issue alive in this repository as well until it gets merged.)

PR #525 has been merged so closing this issue.