TensorFlow 2.0 Beta is available Learn more

tfp.edward2.RelaxedBernoulli

Create a random variable for RelaxedBernoulli.

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

Defined in python/edward2/interceptor.py.

See RelaxedBernoulli for more details.

Returns:

RandomVariable.

Original Docstring for Distribution

Construct RelaxedBernoulli distributions.

Args:

  • temperature: An 0-D Tensor, representing the temperature of a set of RelaxedBernoulli distributions. The temperature should be positive.
  • logits: An N-D Tensor representing the log-odds of a positive event. Each entry in the Tensor parametrizes an independent RelaxedBernoulli distribution where the probability of an event is sigmoid(logits). Only one of logits or probs should be passed in.
  • probs: An N-D Tensor representing the probability of a positive event. Each entry in the Tensor parameterizes an independent Bernoulli distribution. Only one of logits or probs should be passed in.
  • validate_args: Python bool, default False. When True distribution parameters are checked for validity despite possibly degrading runtime performance. When False invalid inputs may silently render incorrect outputs.
  • allow_nan_stats: Python bool, default True. When True, statistics (e.g., mean, mode, variance) use the value "NaN" to indicate the result is undefined. When False, an exception is raised if one or more of the statistic's batch members are undefined.
  • name: Python str name prefixed to Ops created by this class.

Raises:

  • ValueError: If both probs and logits are passed, or if neither.