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

Added eps in the __repr__ of FrozenBN #2852

Merged
merged 6 commits into from
Oct 21, 2020
Merged

Conversation

frgfm
Copy link
Contributor

@frgfm frgfm commented Oct 21, 2020

Hey there 👋

A few months back I suggested the PR #2190 that added the eps attribute to FrozenBN. At that time, we set the default to 0 for backward compatibility. As per #2599, the silent difference of eps is an issue. So here is what this PR does:

  • updates __repr__ method to adds eps to align the method with the one of torch.nn.BatchNorm2d
  • updates the unittest on __repr__

Any suggestion is welcome!

@frgfm frgfm changed the title Aligned eps values in FrozenBN and BatchNorm Added eps in the __repr__ of FrozenBN Oct 21, 2020
Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@fmassa fmassa merged commit 005355b into pytorch:master Oct 21, 2020
@frgfm frgfm deleted the frozenbn-eps branch October 21, 2020 15:23
bryant1410 pushed a commit to bryant1410/vision-1 that referenced this pull request Nov 22, 2020
* feat: Updated FrozenBN eps to align with BatchNorm

* feat: Added eps to __repr__ of FrozenBN

* test: Updated unittest of __repr__ for FrozenBN

* test: Updated unittest for eps value in BN and FrozenBN

* fix: Revert FrozenBN eps value

* test: Revert test on eps alignment between FrozenBN and BN
vfdev-5 pushed a commit to Quansight/vision that referenced this pull request Dec 4, 2020
* feat: Updated FrozenBN eps to align with BatchNorm

* feat: Added eps to __repr__ of FrozenBN

* test: Updated unittest of __repr__ for FrozenBN

* test: Updated unittest for eps value in BN and FrozenBN

* fix: Revert FrozenBN eps value

* test: Revert test on eps alignment between FrozenBN and BN
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.

2 participants