Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add reparameterization support to
OneHotCategorical
(#46610)
Summary: Add reparameterization support to the `OneHotCategorical` distribution. Samples are reparameterized based on the straight-through gradient estimator, which is proposed in the paper [Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computation](https://arxiv.org/abs/1308.3432). Pull Request resolved: #46610 Reviewed By: neerajprad Differential Revision: D25272883 Pulled By: ezyang fbshipit-source-id: 8364408fe108a29620694caeac377a06f0dcdd84
- Loading branch information
1 parent
de46369
commit b006c7a
Showing
3 changed files
with
38 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
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