q(lower_bound=0)}_ ¶

    

` expand ` (  _batch_shape_ , __instance=None_ )  [ [source]
](_modules/torch/distributions/negative_binomial.html#NegativeBinomial.expand)
¶

    

` log_prob ` (  _value_ )  [ [source]
](_modules/torch/distributions/negative_binomial.html#NegativeBinomial.log_prob)
¶

    

` logits ` [ [source]
](_modules/torch/distributions/negative_binomial.html#NegativeBinomial.logits)
¶

    

_property_ ` mean ` ¶

    

_property_ ` param_shape ` ¶

    

` probs ` [ [source]
](_modules/torch/distributions/negative_binomial.html#NegativeBinomial.probs)
¶

    

` sample ` (  _sample_shape=torch.Size([])_ )  [ [source]
](_modules/torch/distributions/negative_binomial.html#NegativeBinomial.sample)
¶

    

` support ` _= IntegerGreaterThan(lower_bound=0)_ ¶

    

_property_ ` variance ` ¶

    

##  Normal  ¶

_class_ ` torch.distributions.normal. ` ` Normal ` (  _loc_ , _scale_ ,
_validate_args=None_ )  [ [source]
](_modules/torch/distributions/normal.html#Normal) ¶

    

Bases:  ` torch.distributions.exp_family.ExponentialFamily  `

Creates a normal (also called Gaussian) distribution parameterized by ` loc  `
and ` scale  ` .

Example:

    
    
    >>> m = Normal(torch.tensor([0.0]), torch.tensor([1.0]))
    >>> m.sample()  # normally distributed with loc=0 and scale=1
    tensor([ 0.1046])
    

Parameters

    

  * **loc** ( [ _float_ ](https://docs.python.org/3/library/functions.html#float "\(in Python v3.8\)") _or_ [ _Tensor_ ](tensors.html#torch.Tensor "torch.Tensor") ) – mean of the distribution (often referred to as mu) 

  * **scale** ( [ _float_ ](https://docs.python.org/3/library/functions.html#float "\(in Python v3.8\)") _or_ [ _Tensor_ ](tensors.html#torch.Tensor "torch.Tensor") ) – standard deviation of the distribution (often referred to as sigma) 

` arg_constraints ` _= {'loc': Real(), 'scale': GreaterThan(lower_bound=0.0)}_
¶

    

` cdf ` (  _value_ )  [ [source]
](_modules/torch/distributions/normal.html#Normal.cdf) ¶

    

` entropy ` (  )  [ [source]
](_modules/torch/distributions/normal.html#Normal.entropy) ¶

    

` expand ` (  _batch_shape_ , __instance=None_ )  [ [source]
](_modules/torch/distributions/normal.html#Normal.expand) ¶

    

` has_rsample ` _= True_ ¶

    

` icdf ` (  _value_ )  [ [source]
](_modules/torch/distributions/normal.html#Normal.icdf) ¶

    

` log_prob ` (  _value_ )  [ [source]
](_modules/torch/distributions/normal.html#Normal.log_prob) ¶

    

_property_ ` mean ` ¶

    

` rsample ` (  _sample_shape=torch.Size([])_ )  [ [source]
](_modules/torch/distributions/normal.html#Normal.rsample) ¶

    

` sample ` (  _sample_shape=torch.Size([])_ )  [ [source]
](_modules/torch/distributions/normal.html#Normal.sample) ¶

    

_property_ ` stddev ` ¶

    

` support ` _= Real()_ ¶

    

_property_ ` variance ` ¶

    

##  OneHotCategorical  ¶

_class_ ` torch.distributions.one_hot_categorical. ` ` OneHotCategorical ` (
_probs=None_ , _logits=None_ , _validate_args=None_ )  [ [source]
](_modules/torch/distributions/one_hot_categorical.html#OneHotCategorical) ¶

    

Bases:  ` torch.distributions.distribution.Distribution  `

Creates a one-hot categorical distribution parameterized by  ` probs  ` or  `
logits  ` .

Samples are one-hot coded vectors of size ` probs.size(-1)  ` .

Note

` probs  ` must be non-negative, finite and have a non-zero sum, and it will
be normalized to sum to 1.

See also: ` torch.distributions.Categorical()  ` for specifications of  `
probs  ` and  ` logits  ` .

Example:

    
    
    >>> m = OneHotCategorical(torch.tensor([ 0.25, 0.25, 0.25, 0.25 ]))
    >>> m.sample()  # equal probability of 0, 1, 2, 3
    tensor([ 0.,  0.,  0.,  1.])
    

Parameters

    

  * **probs** ( [ _Tensor_ ](tensors.html#torch.Tensor "torch.Tensor") ) – event probabilities 

  * **logits** ( [ _Tensor_ ](tensors.html#torch.Tensor "torch.Tensor") ) – event log probabilities 

` arg_constraints ` _= {'logits': Real(), 'probs': Simplex()}_ ¶