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

Fix L1/L2 regularization #216

Merged
merged 3 commits into from
Sep 12, 2020
Merged

Fix L1/L2 regularization #216

merged 3 commits into from
Sep 12, 2020

Conversation

rohitgr7
Copy link
Contributor

@rohitgr7 rohitgr7 commented Sep 12, 2020

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

Regularization loss should also be normalized over batch_size. Also, L2 regularization was wrong there.

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@mergify mergify bot requested a review from Borda September 12, 2020 22:41
@rohitgr7 rohitgr7 changed the title Normalize regularization over batch_size Fix L1/L2 regularization Sep 12, 2020
@codecov
Copy link

codecov bot commented Sep 12, 2020

Codecov Report

Merging #216 into master will increase coverage by 0.04%.
The diff coverage is 90.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #216      +/-   ##
==========================================
+ Coverage   89.14%   89.18%   +0.04%     
==========================================
  Files          74       74              
  Lines        3297     3291       -6     
==========================================
- Hits         2939     2935       -4     
+ Misses        358      356       -2     
Flag Coverage Δ
#unittests 89.18% <90.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pl_bolts/models/regression/logistic_regression.py 97.18% <75.00%> (+2.58%) ⬆️
pl_bolts/models/regression/linear_regression.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 25f8b03...d3f592a. Read the comment docs.

@williamFalcon williamFalcon merged commit aeae230 into master Sep 12, 2020
@rohitgr7 rohitgr7 deleted the bugfix/regularization branch September 13, 2020 05:35
@Borda Borda added the fix fixing issues... label Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix fixing issues...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants