class_docstr: Creates a Bernoulli distribution parameterized by :attr:`probs`
  or :attr:`logits` (but not both).
  
  Samples are binary (0 or 1). They take the value `1` with probability `p`
  and `0` with probability `1 - p`.
  
  Example::
  
      >>> # xdoctest: +IGNORE_WANT("non-deterministic")
      >>> m = Bernoulli(torch.tensor([0.3]))
      >>> m.sample()  # 30% chance 1; 70% chance 0
      tensor([ 0.])
  
  Args:
      probs (Number, Tensor): the probability of sampling `1`
      logits (Number, Tensor): the log-odds of sampling `1`
class_docstr_tok: ["Creates","a","Bernoulli","distribution","parameterized","by",":","attr",":","`","probs","`","or",":","attr",":","`","logits","`","(","but","not","both",")",".","Samples","are","binary","(","0","or","1",")",".","They","take","the","value","`","1","`","with","probability","`","p","`","and","`","0","`","with","probability","`","1","-","p","`",".","Example",":",":",">",">",">","#","xdoctest",":","+IGNORE_WANT","(","``","non-deterministic","''",")",">",">",">","m","=","Bernoulli","(","torch.tensor","(","[","0.3","]",")",")",">",">",">","m.sample","(",")","#","30","%","chance","1",";","70","%","chance","0","tensor","(","[","0",".","]",")","Args",":","probs","(","Number",",","Tensor",")",":","the","probability","of","sampling","`","1","`","logits","(","Number",",","Tensor",")",":","the","log-odds","of","sampling","`","1","`"]
code: def logits(self):
      return probs_to_logits(self.probs, is_binary=True)
  
imports: from numbers import Number
  import torch
  from torch import nan
  from torch.distributions import constraints
  from torch.distributions.exp_family import ExponentialFamily
  from torch.distributions.utils import broadcast_all, lazy_property, logits_to_probs, probs_to_logits
  from torch.nn.functional import binary_cross_entropy_with_logits
label_desc: Use image node_id 7 for calling the Bernoulli obj's underlying member method code with example usage: obj.logits() and returns: probs_to_logits