class_docstr: Creates a Geometric distribution parameterized by :attr:`probs`,
  where :attr:`probs` is the probability of success of Bernoulli trials.
  
  .. math::
  
      P(X=k) = (1-p)^{k} p, k = 0, 1, ...
  
  .. note::
      :func:`torch.distributions.geometric.Geometric` :math:`(k+1)`-th trial is the first success
      hence draws samples in :math:`\{0, 1, \ldots\}`, whereas
      :func:`torch.Tensor.geometric_` `k`-th trial is the first success hence draws samples in :math:`\{1, 2, \ldots\}`.
  
  Example::
  
      >>> # xdoctest: +IGNORE_WANT("non-deterministic")
      >>> m = Geometric(torch.tensor([0.3]))
      >>> m.sample()  # underlying Bernoulli has 30% chance 1; 70% chance 0
      tensor([ 2.])
  
  Args:
      probs (Number, Tensor): the probability of sampling `1`. Must be in range (0, 1]
      logits (Number, Tensor): the log-odds of sampling `1`.
class_docstr_tok: ["Creates","a","Geometric","distribution","parameterized","by",":","attr",":","`","probs","`",",","where",":","attr",":","`","probs","`","is","the","probability","of","success","of","Bernoulli","trials",".","..","math",":",":","P","(","X=k",")","=","(","1-p",")","^","{","k","}","p",",","k","=","0",",","1",",","...","..","note",":",":",":","func",":","`","torch.distributions.geometric.Geometric","`",":","math",":","`","(","k+1",")","`","-th","trial","is","the","first","success","hence","draws","samples","in",":","math",":","`","\\","{","0",",","1",",","\\ldots\\","}","`",",","whereas",":","func",":","`","torch.Tensor.geometric_","`","`","k","`","-th","trial","is","the","first","success","hence","draws","samples","in",":","math",":","`","\\","{","1",",","2",",","\\ldots\\","}","`",".","Example",":",":",">",">",">","#","xdoctest",":","+IGNORE_WANT","(","``","non-deterministic","''",")",">",">",">","m","=","Geometric","(","torch.tensor","(","[","0.3","]",")",")",">",">",">","m.sample","(",")","#","underlying","Bernoulli","has","30","%","chance","1",";","70","%","chance","0","tensor","(","[","2",".","]",")","Args",":","probs","(","Number",",","Tensor",")",":","the","probability","of","sampling","`","1","`",".","Must","be","in","range","(","0",",","1","]","logits","(","Number",",","Tensor",")",":","the","log-odds","of","sampling","`","1","`","."]
code: def mean(self):
      return 1.0 / self.probs - 1.0
  
file_path: pytorch/torch/distributions/geometric.py
imports: from numbers import Number
  import torch
  from torch.distributions import constraints
  from torch.distributions.distribution import Distribution
  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 3 for calling the Geometric obj's underlying member method code with example usage: obj.mean() and returns: unknown