parameters: (self,
                 logits=None,
                 p=None,
                 dtype=dtypes.int32,
                 validate_args=True,
                 allow_nan_stats=False,
                 name="Bernoulli")
docstring: Construct Bernoulli distributions.
  
      Args:
        logits: An N-D `Tensor` representing the log-odds
          of a positive event. Each entry in the `Tensor` parametrizes
          an independent Bernoulli distribution where the probability of an event
          is sigmoid(logits).
        p: An N-D `Tensor` representing the probability of a positive
            event. Each entry in the `Tensor` parameterizes an independent
            Bernoulli distribution.
        dtype: dtype for samples.
        validate_args: Whether to assert that `0 <= p <= 1`. If not validate_args,
         `log_pmf` may return nans.
        allow_nan_stats:  Boolean, default `False`.  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.
  
      Raises:
        ValueError: If p and logits are passed, or if neither are passed.
docstring_summary: Construct Bernoulli distributions.
docstring_tokens: Construct Bernoulli distributions .
function: def __init__(self,
                 logits=None,
                 p=None,
                 dtype=dtypes.int32,
                 validate_args=True,
                 allow_nan_stats=False,
                 name="Bernoulli"):
      """Construct Bernoulli distributions.
  
      Args:
        logits: An N-D `Tensor` representing the log-odds
          of a positive event. Each entry in the `Tensor` parametrizes
          an independent Bernoulli distribution where the probability of an event
          is sigmoid(logits).
        p: An N-D `Tensor` representing the probability of a positive
            event. Each entry in the `Tensor` parameterizes an independent
            Bernoulli distribution.
        dtype: dtype for samples.
        validate_args: Whether to assert that `0 <= p <= 1`. If not validate_args,
         `log_pmf` may return nans.
        allow_nan_stats:  Boolean, default `False`.  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.
  
      Raises:
        ValueError: If p and logits are passed, or if neither are passed.
      """
      self._allow_nan_stats = allow_nan_stats
      self._name = name
      self._dtype = dtype
      self._validate_args = validate_args
      self._logits, self._p = distribution_util.get_logits_and_prob(
          name=name, logits=logits, p=p, validate_args=validate_args)
      with ops.name_scope(name):
        with ops.name_scope("q"):
          self._q = 1. - self._p
      self._batch_shape = array_ops.shape(self._logits)
      self._event_shape = array_ops.constant([], dtype=dtypes.int32)
function_tokens: def __init__ ( self , logits = None , p = None , dtype = dtypes . int32 , validate_args = True , allow_nan_stats = False , name = "Bernoulli" ) : self . _allow_nan_stats = allow_nan_stats self . _name = name self . _dtype = dtype self . _validate_args = validate_args self . _logits , self . _p = distribution_util . get_logits_and_prob ( name = name , logits = logits , p = p , validate_args = validate_args ) with ops . name_scope ( name ) : with ops . name_scope ( "q" ) : self . _q = 1. - self . _p self . _batch_shape = array_ops . shape ( self . _logits ) self . _event_shape = array_ops . constant ( [ ] , dtype = dtypes . int32 )