You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
This diff fixes the incorrect warning when running `mean.compute()` when the mean is exactly 0.
Instead of checking for the weighted sum of elements to be 0, we instead check for the total sum of weights to be zero (meaning that the average can be 0 without error, but we throw a warning when dividing by zero)
We also update the error message to reflect that the issue is no weight has been accumulated, since it is possible to call this function with only 0 weights.
Addresses: pytorch#185
Reviewed By: JKSenthil
Differential Revision: D50806243
0 commit comments