Skip to content

add a default weight_size #772

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

Merged
merged 1 commit into from
Apr 20, 2023
Merged

add a default weight_size #772

merged 1 commit into from
Apr 20, 2023

Conversation

jmitrevs
Copy link
Contributor

Description

It's possible to read the variable before writing. This sets a default value

Type of change

  • Bug fix (non-breaking change that fixes an issue)

Tests

Standard tests should be enough

Checklist

  • I have read the guidelines for contributing.
  • My changes generate no new warnings.
  • I have installed and run pre-commit on the files I edited or added.
  • I have added tests that prove my fix is effective or that my feature works.

@jmitrevs jmitrevs added the bug label Apr 19, 2023
@jmitrevs jmitrevs requested a review from vloncar April 20, 2023 22:05
@jmitrevs
Copy link
Contributor Author

I believe an error was triggered with batch norms in Quartus, with weight_size being undefined. This fix treats BatchNorm weights as being small, which might not be the best fix in all cases. Nevertheless, we should not read a variable without making sure that each possible branch has it defined.

@vloncar
Copy link
Contributor

vloncar commented Apr 20, 2023

0.7.0?

@jmitrevs
Copy link
Contributor Author

I think so. It's a 1-line change, which prevents a crash.

@vloncar vloncar merged commit 1002f3e into main Apr 20, 2023
@vloncar vloncar deleted the set_default_weight_size branch April 20, 2023 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants