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

Add Missing Variables in Conv Model #354

Merged
merged 3 commits into from
Sep 23, 2022

Conversation

SveaMeyer13
Copy link
Contributor

Issue Number: #353

Objective of pull request: Conv Process and PyConvModelFloat don't have the same Variables. As a quick fix, I added weight_exp and num_weight_bits to the AbstractPyConvModel. One could alternatively add these variables to PyConvModelFloat or not declare them as Var in Conv.

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)
  • [ x] Docs reviewed and added / updated if needed (for bug fixes / features)
  • [ x] PR conforms to Coding Conventions
  • [ x] 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:

  • [x ] 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?

Running the Conv Process with PyConvModelFloat throws "AssertionError: Both Process 'Conv' and ProcessModel 'PyConvModelFloat' are expected to have Var named 'num_weight_bits'." as the Process and its Model don't have the exact same Variables.

Does this introduce a breaking change?

  • Yes
  • [ x] No

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.

Looks good @SveaMeyer13, just one minor change.

src/lava/proc/conv/models.py Show resolved Hide resolved
@mgkwill mgkwill merged commit ad76d5b into lava-nc:main Sep 23, 2022
monkin77 pushed a commit to monkin77/thesis-lava that referenced this pull request Jul 12, 2024
* add missing variables

* Remove redundant vars 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants