tf.contrib.distributions.Bernoulli.__init__(logits=None, p=None, dtype=tf.int32, validate_args=False, allow_nan_stats=True, name='Bernoulli')
Construct Bernoulli distributions.
Args:
-
logits: An N-DTensorrepresenting the log-odds of a positive event. Each entry in theTensorparametrizes an independent Bernoulli distribution where the probability of an event is sigmoid(logits). -
p: An N-DTensorrepresenting the probability of a positive event. Each entry in theTensorparameterizes an independent Bernoulli distribution. -
dtype: dtype for samples. -
validate_args:Boolean, defaultFalse. Whether to validate that0 <= p <= 1. Ifvalidate_argsisFalse, and the inputs are invalid, methods likelog_pmfmay returnNaNvalues. -
allow_nan_stats:Boolean, defaultTrue. IfFalse, raise an exception if a statistic (e.g. mean/mode/etc...) is undefined for any batch member. IfTrue, batch members with valid parameters leading to undefined statistics will return NaN for this statistic. -
name: A name for this distribution.
Raises:
-
ValueError: If p and logits are passed, or if neither are passed.
Please login to continue.