class_docstr: Bernoulli distribution.
  
  The Bernoulli distribution with `probs` parameter, i.e., the probability of a
  `1` outcome (vs a `0` outcome).
class_docstr_tok: ["Bernoulli","distribution",".","The","Bernoulli","distribution","with","`","probs","`","parameter",",","i.e.",",","the","probability","of","a","`","1","`","outcome","(","vs","a","`","0","`","outcome",")","."]
code: def _log_prob(self, event):
      if self.validate_args:
          event = distribution_util.embed_check_integer_casting_closed(
              event, target_dtype=dtypes.bool
          )
  
      # TODO(jaana): The current sigmoid_cross_entropy_with_logits has
      # inconsistent behavior for logits = inf/-inf.
      event = math_ops.cast(event, self.logits.dtype)
      logits = self.logits
      # sigmoid_cross_entropy_with_logits doesn't broadcast shape,
      # so we do this here.
  
      def _broadcast(logits, event):
          return (
              array_ops.ones_like(event) * logits,
              array_ops.ones_like(logits) * event,
          )
  
      if not (
          event.get_shape().is_fully_defined()
          and logits.get_shape().is_fully_defined()
          and event.get_shape() == logits.get_shape()
      ):
          logits, event = _broadcast(logits, event)
      return -nn.sigmoid_cross_entropy_with_logits(
          labels=event, logits=logits
      )
  
imports: from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops.distributions import distribution
  from tensorflow.python.ops.distributions import kullback_leibler
  from tensorflow.python.ops.distributions import util
  from tensorflow.python.util import deprecation
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 10 for calling the Bernoulli obj's underlying member method code with example usage: obj._log_prob(event) and returns: unknown, unknown,  unknown