Created
August 1, 2022 21:49
-
-
Save radi-cho/04bb09afda72af64c397ac9f62eb9ee6 to your computer and use it in GitHub Desktop.
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
temperature = 10 | |
dist = tfp.distributions.RelaxedOneHotCategorical(temperature, probs=p) | |
dist.sample() | |
<tf.Tensor: shape=(3,), dtype=float32, numpy=array([0.31916314, 0.34642866, 0.33440822], dtype=float32)> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment