-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix warning in aggregation.mean (#187)
Summary: Pull Request resolved: #187 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: #185 Reviewed By: JKSenthil Differential Revision: D50806243 fbshipit-source-id: 04d75826ae8c1a24cc3718967d86bdd982081538
- Loading branch information
1 parent
235aa26
commit f293b9b
Showing
2 changed files
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters