-
Notifications
You must be signed in to change notification settings - Fork 54
Add attributes to spike events #1137
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
Draft
clinssen
wants to merge
93
commits into
nest:master
Choose a base branch
from
clinssen:event_attributes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #946.
Fixes #944.
Adds attributes to input spike events (see documentation updates inside this PR for more details).
The spike event
handle()
method now needs to store each received spike in a separate buffer entry, otherwise excitatory and inhibitory spikes (which are distinguished by sign of the weight); if they are not in a separate buffer, an inhibitory spike with weight -4 and excitatory spike of weight 1 would end up as an inhibitory spike of -3). A consequence of this is more buffering is needed, which could result in a performance hit. A code generator option should be introduced, that gives a list of spiking input port names, such that for each port, it allows the regular RingBuffers to be used.(t)
suffix, for instance:x' = -x / tau + spikes_in_port.weight(t)
(in theequations
block) versusx += spikes_in_port.weight
(in theonReceive
block). Or we require the attributes to be convolved with a delta kernel in the onReceive blocks:onReceive(spike_in_port): I_syn += convolve(delta(t), spike_in_port.weight)
Benchmarking shows that performance degradation for the most general case (without
linear_time_invariant_spiking_input_ports
enabled) is only on the order of 12.5%. Withlinear_time_invariant_spiking_input_ports
enabled, performance is indistinguishable from what it was before this PR.Notes for reviewers
See especially the following sections in the documentation to review:
From
https://nestml-sandbox.readthedocs.io/en/latest/nestml_language/nestml_language_concepts.html#spiking-input-ports
until (not including) the section "Guards".