-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mean + variance to tfd.Categorical
Bernoulli has them, OneHotCategorical has them, so should Categorical. The implementation strategy is taken from MixtureSameFamily. It's not obvious that using log-probs rather than probs is more numerically stable. PiperOrigin-RevId: 656458058
- Loading branch information
1 parent
9b07a2e
commit b14ae1d
Showing
2 changed files
with
45 additions
and
0 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