class_docstr: Creates a Multinomial distribution parameterized by :attr:`total_count` and
  either :attr:`probs` or :attr:`logits` (but not both). The innermost dimension of
  :attr:`probs` indexes over categories. All other dimensions index over batches.
  
  Note that :attr:`total_count` need not be specified if only :meth:`log_prob` is
  called (see example below)
  
  .. note:: The `probs` argument must be non-negative, finite and have a non-zero sum,
            and it will be normalized to sum to 1 along the last dimension. :attr:`probs`
            will return this normalized value.
            The `logits` argument will be interpreted as unnormalized log probabilities
            and can therefore be any real number. It will likewise be normalized so that
            the resulting probabilities sum to 1 along the last dimension. :attr:`logits`
            will return this normalized value.
  
  -   :meth:`sample` requires a single shared `total_count` for all
      parameters and samples.
  -   :meth:`log_prob` allows different `total_count` for each parameter and
      sample.
  
  Example::
  
      >>> # xdoctest: +SKIP("FIXME: found invalid values")
      >>> m = Multinomial(100, torch.tensor([ 1., 1., 1., 1.]))
      >>> x = m.sample()  # equal probability of 0, 1, 2, 3
      tensor([ 21.,  24.,  30.,  25.])
  
      >>> Multinomial(probs=torch.tensor([1., 1., 1., 1.])).log_prob(x)
      tensor([-4.1338])
  
  Args:
      total_count (int): number of trials
      probs (Tensor): event probabilities
      logits (Tensor): event log probabilities (unnormalized)
class_docstr_tok: ["Creates","a","Multinomial","distribution","parameterized","by",":","attr",":","`","total_count","`","and","either",":","attr",":","`","probs","`","or",":","attr",":","`","logits","`","(","but","not","both",")",".","The","innermost","dimension","of",":","attr",":","`","probs","`","indexes","over","categories",".","All","other","dimensions","index","over","batches",".","Note","that",":","attr",":","`","total_count","`","need","not","be","specified","if","only",":","meth",":","`","log_prob","`","is","called","(","see","example","below",")","..","note",":",":","The","`","probs","`","argument","must","be","non-negative",",","finite","and","have","a","non-zero","sum",",","and","it","will","be","normalized","to","sum","to","1","along","the","last","dimension",".",":","attr",":","`","probs","`","will","return","this","normalized","value",".","The","`","logits","`","argument","will","be","interpreted","as","unnormalized","log","probabilities","and","can","therefore","be","any","real","number",".","It","will","likewise","be","normalized","so","that","the","resulting","probabilities","sum","to","1","along","the","last","dimension",".",":","attr",":","`","logits","`","will","return","this","normalized","value",".","-",":","meth",":","`","sample","`","requires","a","single","shared","`","total_count","`","for","all","parameters","and","samples",".","-",":","meth",":","`","log_prob","`","allows","different","`","total_count","`","for","each","parameter","and","sample",".","Example",":",":",">",">",">","#","xdoctest",":","+SKIP","(","``","FIXME",":","found","invalid","values","''",")",">",">",">","m","=","Multinomial","(","100",",","torch.tensor","(","[","1.",",","1.",",","1.",",","1",".","]",")",")",">",">",">","x","=","m.sample","(",")","#","equal","probability","of","0",",","1",",","2",",","3","tensor","(","[","21.",",","24.",",","30.",",","25",".","]",")",">",">",">","Multinomial","(","probs=torch.tensor","(","[","1.",",","1.",",","1.",",","1",".","]",")",")",".log_prob","(","x",")","tensor","(","[","-4.1338","]",")","Args",":","total_count","(","int",")",":","number","of","trials","probs","(","Tensor",")",":","event","probabilities","logits","(","Tensor",")",":","event","log","probabilities","(","unnormalized",")"]
code: def _new(self, *args, **kwargs):
      return self._categorical._new(*args, **kwargs)
  
file_path: pytorch/torch/distributions/multinomial.py
imports: import torch
  from torch import inf
  from torch.distributions import Categorical, constraints
  from torch.distributions.binomial import Binomial
  from torch.distributions.distribution import Distribution
  from torch.distributions.utils import broadcast_all
label_desc: Use image node_id 5 for calling the Multinomial obj's underlying member method code with example usage: obj._new() and returns: self