You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I hope it's okay to use the issue tracker for asking a question.
So I'm aware that brian2genn doesn't support summed variables and writing to a post-synaptic output variable in a Synapse's on_pre handler. As I do need something like this, I was wondering how to work around that limitation in the following model (excerpt, an executable file is available here https://gist.github.com/jangmarker/5092a3dacd2dceb34ff2c85a150b8596):
This model needs weight_sum to be the sum of all weights in order to normalize the weights.
This works fine in standalone mode but brian2genn complains about the mix of summed variable and modifying a post-synaptic variable in the on_pre handler:
NotImplementedError: brian2genn only supports a either a single synaptic output variable or a single summed variable per Synapses group.
The text was updated successfully, but these errors were encountered:
Quick further update: Short of @mstimberg finding a creative workaround, recent improvements in GeNN might allow to remove some restrictions on the number of post-synaptic target variables you encountered here.
Unfortunately, it is a very busy time at the moment so it will take a while before I can have a look at this possible improvement on brian2genn.
Hi. I don't see an easy workaround at first glance, maybe a hand-written C++ function that does the summing launched via a run_regularly operation on the Synapses object could work? But that probably requires looking at the generated code to use the correct names, etc. Also, not 100% sure whether Brian2GeNN would handle getting the values from the GPU memory correctly in that case. I'm afraid I can't look into this any further before August, I'm currently on holiday!
Thank you both for your suggestions. I will explore them the next weeks and will report back. For me this is still evaluation, so there's no urgency to all this. @mstimberg I wish you good holidays! :-)
Hi! I hope it's okay to use the issue tracker for asking a question.
So I'm aware that brian2genn doesn't support summed variables and writing to a post-synaptic output variable in a Synapse's
on_pre
handler. As I do need something like this, I was wondering how to work around that limitation in the following model (excerpt, an executable file is available here https://gist.github.com/jangmarker/5092a3dacd2dceb34ff2c85a150b8596):This model needs
weight_sum
to be the sum of all weights in order to normalize the weights.This works fine in
standalone
mode but brian2genn complains about the mix of summed variable and modifying a post-synaptic variable in theon_pre
handler:The text was updated successfully, but these errors were encountered: