-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Take multiplicity into account in local_spike_counter #1101
Take multiplicity into account in local_spike_counter #1101
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @stinebuu !
I think the test could be simplified as described below.
Description:
Creates a parrot neuron, which receives one spike with multiplicity two from a spike generator. The parrot neuron should then emit a spike with multiplicity two, which should be counted as two spikes by the local spike counter.
@jougs this PR is similar to #1105 . Could you please take a look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than that it looks really terrible with all these cvgidcollection
s sprinkled throughout the code, I think this is a good fix and the best test for it until the full glory of the GidCollection
is unleashed. Many thanks!
@suku248 The test in this PR creates 4000 source parrot neurons and 10 target parrot neurons and the source neurons receive spikes from a Description: |
@stinebuu As this is a regression test, I'd prefer it to be as minimalist as possible. A minimalist test that exposes the bug (spikes of parrot neurons with multiplicity > 1 are not counted multiple times) is the one that I described above: One spike generator is connected to one parrot neuron. The spike generator feeds one spike with multiplicity two to the parrot neuron, which then emits a spike with multiplicity two. In the current master, the local spike counter only counts one spike, which is incorrect 🐛. With this PR, the local spike counter should count two spikes 🦋. |
With this PR, the
local_spike_counter
will also add the multiplicity so that we get the correct spike count.This fixes #1100.