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
Added number of features in FrozenBatchNorm2d __repr__ #2168
Conversation
While BatchNorm layers have extensive information in their repr, FrozenBatchNorm2d has one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I have a comment, let me know what you think
Since support of Python version ealier than 3.6 have been dropped, f-string can be used.
Codecov Report
@@ Coverage Diff @@
## master #2168 +/- ##
=========================================
- Coverage 0.48% 0.48% -0.01%
=========================================
Files 92 92
Lines 7442 7444 +2
Branches 1135 1135
=========================================
Hits 36 36
- Misses 7393 7395 +2
Partials 13 13
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks a lot @frgfm !
I would just want to ping @seemethere , because with this PR we effectively break support for Python 3.5 due to the f-strings, so I wanted to get his approval first.
* feat: Added number of features in FrozenBatchNorm2d repr While BatchNorm layers have extensive information in their repr, FrozenBatchNorm2d has one * refactor: Refactored FrozenBatchNorm2d __repr__ * test: Added unittest for FrozenBatchNorm2d __repr__ * style: Removed blank lines in test_ops * refactor: Avoids creating an extra attribute for __repr__ * style: Switched __repr__ to f-string Since support of Python version ealier than 3.6 have been dropped, f-string can be used. * fix: Fixed typo in __repr__ * style: Switched unittest .format to f-string
Summary: * feat: Added number of features in FrozenBatchNorm2d repr While BatchNorm layers have extensive information in their repr, FrozenBatchNorm2d has one * refactor: Refactored FrozenBatchNorm2d __repr__ * test: Added unittest for FrozenBatchNorm2d __repr__ * style: Removed blank lines in test_ops * refactor: Avoids creating an extra attribute for __repr__ * style: Switched __repr__ to f-string Since support of Python version ealier than 3.6 have been dropped, f-string can be used. * fix: Fixed typo in __repr__ * style: Switched unittest .format to f-string Pull Request resolved: #2431 Reviewed By: zhangguanheng66 Differential Revision: D22437793 Pulled By: fmassa fbshipit-source-id: 76fd6a42f0b6cabe47c96fcb5a343fe580a0005e
This PR aims at:
__repr__
attribute to theFrozenBatchNorm2d
classSuggestions are welcomed for the proposed formatting!