-
-
Notifications
You must be signed in to change notification settings - Fork 608
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
Updated Dropout for more input types. #1867
Conversation
Replacing the call to rand! in the _dropout_mask function to account for complex (float) data types.
Codecov Report
@@ Coverage Diff @@
## master #1867 +/- ##
==========================================
+ Coverage 84.50% 84.51% +0.01%
==========================================
Files 21 21
Lines 1484 1485 +1
==========================================
+ Hits 1254 1255 +1
Misses 230 230
Continue to review full report at Codecov.
|
…sed when an Int input.
The return type of dropout if NOT "active" for Int types would be Int. That doesn't seem like a good thing, so I think that's a no on this one too. |
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.
Can you add an entry in NEWS.md?
This still needs a new review, I've found something while testing with int types. |
This behaviour is already present on master. I don't think it needs to be addressed in this PR. If anything, this PR improves compatibility with int inputs, as before |
The fix should make the inactive path return a chosen float type. It doesn't make sense to return an integer with the scaling. |
The tricky part is that the inactive path doesn't require any scaling. Or put another way, it's semantically equivalent to |
True, but I think the return type should be stable across active/inactive regardless of the actual computation. |
Co-authored-by: Brian Chen <[email protected]>
Co-authored-by: Kyle Daruwalla <[email protected]>
Since scaling is not optional, it kinda makes sense to error, it would at least let the user know that something is wrong. |
It's not exactly an error, right? Mathematically the correct output exists, but it cannot be an integer except for very limited values of |
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.
Either way, I agree with @ToucheSir that we should merge this and then deal with the type stability issue in a separate PR.
Shall we merge this? |
Replacing the call to rand! in the _dropout_mask function to account
for complex (float) data types.
See discussion: #1572
PR Checklist