class_docstr: Create a bernoulli distribution object.
  
  Parameters
  ----------
  prob : Tensor or scalar, default None
      Probability of sampling `1`.
  logit : Tensor or scalar, default None
      The log-odds of sampling `1`.
class_docstr_tok: ["Create","a","bernoulli","distribution","object",".","Parameters","--","--","--","--","--","prob",":","Tensor","or","scalar",",","default","None","Probability","of","sampling","`","1","`",".","logit",":","Tensor","or","scalar",",","default","None","The","log-odds","of","sampling","`","1","`","."]
code: def log_prob(self, value):
      if self._validate_args:
          self._validate_samples(value)
      if self.prob is None:
          logit = self.logit
          return logit * (value - 1) - np.log(np.exp(-logit) + 1)
      else:
          # Parameterized by probability
          eps = 1e-12
          return np.log(self.prob + eps) * value + np.log1p(
              -self.prob + eps
          ) * (1 - value)
  
file_path: mxnet/python/mxnet/gluon/probability/distributions/bernoulli.py
imports: from .exp_family import ExponentialFamily
  from .utils import prob2logit, logit2prob, cached_property, sample_n_shape_converter
  from .constraint import Boolean, Interval, Real
  from ....None import np, npx
label_desc: Use image node_id 7 for calling the Bernoulli obj's underlying member method code with example usage: obj.log_prob(value) and returns: unknown, unknown