Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tfp.edward2.ContinuousBernoulli

View source on GitHub

Create a random variable for ContinuousBernoulli.

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

See ContinuousBernoulli for more details.

Returns:

RandomVariable.

Original Docstring for Distribution

Construct Bernoulli distributions.

Args:

  • logits: An N-D Tensor. Each entry in the Tensor parameterizes an independent continuous Bernoulli distribution with parameter sigmoid(logits). Only one of logits or probs should be passed in. Note that this does not correspond to the log-odds as in the Bernoulli case.
  • probs: An N-D Tensor representing the parameter of a continuous Bernoulli. Each entry in the Tensor parameterizes an independent continuous Bernoulli distribution. Only one of logits or probs should be passed in. Note that this also does not correspond to a probability as in the Bernoulli case.
  • lims: A list with two floats containing the lower and upper limits used to approximate the continuous Bernoulli around 0.5 for numerical stability purposes.
  • dtype: The type of the event samples. Default: float32. 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 probs and logits are passed, or if neither are passed.