-
Notifications
You must be signed in to change notification settings - Fork 7k
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
[BC-breaking] RandomErasing is now scriptable #2386
[BC-breaking] RandomErasing is now scriptable #2386
Conversation
- RandomErasing is not scriptable
Codecov Report
@@ Coverage Diff @@
## master #2386 +/- ##
==========================================
- Coverage 70.76% 70.72% -0.04%
==========================================
Files 93 94 +1
Lines 7788 7870 +82
Branches 1209 1238 +29
==========================================
+ Hits 5511 5566 +55
- Misses 1913 1930 +17
- Partials 364 374 +10
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.
The PR looks great, thanks a lot @vfdev-5 !
I only have a couple of minor comments (typo and perf improvement to move the code to where it was before).
After that this is good to merge!
- added additional checking of value vs img num_channels
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 a lot!
* Related to pytorch#2292 - RandomErasing is not scriptable * Fixed code according to review comments - added additional checking of value vs img num_channels
Related to #2292
Description
This PR changes the default behavior of
get_params
function, as beforevalue=0
and nowvalue=None
which is interpreted as Gaussian random noise. If users are callingget_params
explicitly this would be a BC-breaking change.