Skip to content
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

fixed a small bug in the adrf neuron forward function #308

Merged
merged 2 commits into from
May 14, 2024

Conversation

felixthoe
Copy link
Contributor

Issue Number: #277

Objective of pull request: Small bug fix, I changed self.spike(real, imag, threshold + refractory) to self.spike(real, imag, threshold, refractory)

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?

  • There seems to be a small bug in the implementation of the adrf neuron (lava-dl/src/lib/dl/slayer/neuron/adrf.py). The Neuron.forward() function calls self.spike(real, imag, threshold + refractory), while it should be self.spike(real, imag, threshold, refractory) according to the definition of the function Neuron.spike() in the same file. This results in a TypeError because the last positional argument is missing in the function call.

What is the new behavior?

  • The function call is now executed with the four parameters as four positional arguments, as intended.

Does this introduce a breaking change?

  • Yes
  • No

Supplemental information

@bamsumit bamsumit linked an issue May 14, 2024 that may be closed by this pull request
Copy link
Contributor

@bamsumit bamsumit left a comment

Choose a reason for hiding this comment

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

@felixthoe Thanks for catching this bug :)

@bamsumit bamsumit merged commit 37ce65d into lava-nc:main May 14, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError when using adrf neurons
2 participants