tfp.edward2.RelaxedOneHotCategorical

View source on GitHub

Create a random variable for RelaxedOneHotCategorical.

Aliases:

tfp.edward2.RelaxedOneHotCategorical(
    *args,
    **kwargs
)

See RelaxedOneHotCategorical for more details.

Returns:

RandomVariable.

Original Docstring for Distribution

Initialize RelaxedOneHotCategorical using class log-probabilities.

Args:

  • temperature: An 0-D Tensor, representing the temperature of a set of RelaxedOneHotCategorical distributions. The temperature should be positive.
  • logits: An N-D Tensor, N >= 1, representing the log probabilities of a set of RelaxedOneHotCategorical distributions. The first N - 1 dimensions index into a batch of independent distributions and the last dimension represents a vector of logits for each class. Only one of logits or probs should be passed in.
  • probs: An N-D Tensor, N >= 1, representing the probabilities of a set of RelaxedOneHotCategorical distributions. The first N - 1 dimensions index into a batch of independent distributions and the last dimension represents a vector of probabilities for each class. Only one of logits or probs should be passed in.
  • validate_args: Unused in this distribution.
  • allow_nan_stats: Python bool, default True. If False, raise an exception if a statistic (e.g. mean/mode/etc...) is undefined for any batch member. If True, batch members with valid parameters leading to undefined statistics will return NaN for this statistic.
  • name: A name for this distribution (optional).