Skip to content

Fix issue 334#364

Merged
mgkwill merged 7 commits intomainfrom
fix_issue_334
Sep 23, 2022
Merged

Fix issue 334#364
mgkwill merged 7 commits intomainfrom
fix_issue_334

Conversation

@PhilippPlank
Copy link
Copy Markdown
Contributor

Changed calculation of wrapped_current.

Issue Number: #334

Objective of pull request: Fix subthr_dynamics() function for fixed point lif model so that neuron current wraps to opposite side of integer range rather than to 0.

Pull request checklist

Your PR fulfills the following requirements:

  • Issue created that explains the change and why it's needed
  • Tests are part of the PR (for bug fixes / features)
  • Docs reviewed and added / updated if needed (for bug fixes / features)
  • PR conforms to Coding Conventions
  • PR applys BSD 3-clause or LGPL2.1+ Licenses to all code files
  • Lint (flakeheaven lint src/lava tests/) and (bandit -r src/lava/.) pass locally
  • Build tests (pytest) passes locally

Pull request type

Please check your PR type:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation changes
  • Other (please describe):

What is the current behavior?

  • Right now on integer overflow of current, the current wraps back around to 0

What is the new behavior?

  • You'd expect the current to wrap around to -2^23 if the current is positively accumulating or +2^23 if accumulating negatively. That would be Loihi 1 behavior. Unclear about Loihi 2.

Does this introduce a breaking change?

  • Yes
  • No

Supplemental information

Changed calculation of wrapped_current.
fixed linting
Copy link
Copy Markdown
Contributor

@GaboFGuerra GaboFGuerra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Philipp, not sure if there should be a test added or affected by this.

Comment thread src/lava/proc/lif/models.py
@mgkwill mgkwill merged commit d02b8d6 into main Sep 23, 2022
@mgkwill mgkwill deleted the fix_issue_334 branch September 23, 2022 17:25
monkin77 pushed a commit to monkin77/thesis-lava that referenced this pull request Jul 12, 2024
* Update models.py

Changed calculation of wrapped_current.

* Update models.py

fixed linting

* Remove unused  sign_of_curr from models.py

Co-authored-by: Marcus G K Williams <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1-bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lif subthr_dynamics() for 'fixed_pt' doesn't properly wrap neuron current

3 participants