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-DTensor
representing the log-odds of a positive event. Each entry in theTensor
parametrizes an independent Bernoulli distribution where the probability of an event is sigmoid(logits). -
p
: An N-DTensor
representing the probability of a positive event. Each entry in theTensor
parameterizes an independent Bernoulli distribution. -
dtype
: dtype for samples. -
validate_args
:Boolean
, defaultFalse
. Whether to validate that0 <= p <= 1
. Ifvalidate_args
isFalse
, and the inputs are invalid, methods likelog_pmf
may returnNaN
values. -
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.