-
Notifications
You must be signed in to change notification settings - Fork 144
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
LIF refractory floating point #655
LIF refractory floating point #655
Conversation
Oh boy, sorry @ssgier for the long delay. I have not been monitoring Github for a while and we overlooked this PR. Hopefully, we can review and get this merged soon now. |
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 for this clean implementation there is not much to ask for.
The only thing is, that I would like to change the default value to 0 instead of 1. In your current implementation, 1 means "no refractoryness" and yields the same results as the normal LIF. In my understanding, 1 should mean that the voltage is clamped to zero for one timestep after spiking. Hence I would change the line
non_refractory = self.refractory_period_end <= self.time_step
to
non_refractory = self.refractory_period_end < self.time_step
and allow refractory_period to be 0 but not negative.
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.
Looks good. Some minor comments from my side ;)
* LIF refractory float * Fix off-by-one bug * Comment style consistency --------- Co-authored-by: PhilippPlank <[email protected]> Co-authored-by: Mathis Richter <[email protected]> Co-authored-by: weidel-p <[email protected]>
Issue Number: #282
Objective of pull request: Add LIF process with refractory period
Pull request checklist
Your PR fulfills the following requirements:
flakeheaven lint src/lava tests/
) and (bandit -r src/lava/.
) pass locallypytest
) passes locallyPull request type
Please check your PR type:
What is the current behavior?
What is the new behavior?
Does this introduce a breaking change?
Supplemental information
As discussed with @mathisrichter, I created a new process based on the LIF process with reset. This change currently only includes the floating point process model in Python as a start. It could serve as a starting point to discuss/implement other process models.