shrinath-suresh/blogs-docs-splitted huggingface dataset:
used due to the similarity with the Bernoulli. See [1] for more
   details.
Example:
  >>> m = ContinuousBernoulli(torch.tensor([0.3]))
  >>> m.sample()
  tensor([ 0.2538])

Parameters:
      * probs (Number, Tensor) -- (0,1) valued parameters
  * **logits** (*Number**, **Tensor*) -- real valued parameters
    whose sigmoid matches 'probs'

[1] The continuous Bernoulli: fixing a pervasive error in
   variational autoencoders, Loaiza-Ganem G and Cunningham JP, NeurIPS
   2019. https://arxiv.org/abs/1907.06845
arg_constraints = {'logits': Real(), 'probs': Interval(lower_bound=0.0, upper_bound=1.0)}
cdf(value)
entropy()
expand(batch_shape, _instance=None)
has_rsample = True
icdf(value)
log_prob(value)
property logits
property mean
property param_shape
property probs
rsample(sample_shape=torch.Size([]))
sample(sample_shape=torch.Size([]))
property stddev
support = Interval(lower_bound=0.0, upper_bound=1.0)
property variance
Dirichlet
class torch.distributions.dirichlet.Dirichlet(concentration, validate_args=None)
Bases: "ExponentialFamily"
Creates a Dirichlet distribution parameterized by concentration
   "concentration".
Example:
  >>> m = Dirichlet(torch.tensor([0.5, 0.5]))
  >>> m.sample()  # Dirichlet distributed with concentration [0.5, 0.5]
  tensor([ 0.1046,  0.8954])

Parameters:
      concentration (Tensor) -- concentration parameter of the
      distribution (often referred to as alpha)
arg_constraints = {'concentration': IndependentConstraint(GreaterThan(lower_bound=0.0), 1)}
entropy()
expand(batch_shape, _instance=None)
has_rsample = True
log_prob(value)
property mean
property mode
rsample(sample_shape=())
support = Simplex()
property variance
Exponential
class torch.distributions.exponential.Exponential(rate, validate_args=None)
Bases: "ExponentialFamily"
Bases: "ExponentialFamily"
Creates a Exponential distribution parameterized by "rate".
Example:
  >>> m = Exponential(torch.tensor([1.0]))
  >>> m.sample()  # Exponential distributed with rate=1
  tensor([ 0.1046])

Parameters:
      rate (float or Tensor) -- rate = 1 / scale of the
      distribution
arg_constraints = {'rate': GreaterThan(lower_bound=0.0)}
cdf(value)
entropy()
expand(batch_shape, _instance=None)
has_rsample = True
icdf(value)
log_prob(value)
property mean
property mode
rsample(sample_shape=torch.Size([]))
property stddev
support = GreaterThanEq(lower_bound=0.0)
property variance
FisherSnedecor
class torch.distributions.fishersnedecor.FisherSnedecor(df1, df2, validate_args=None)
Bases: "Distribution"
Creates a Fisher-Snedecor distribution parameterized by "df1" and
   "df2".
Example:
  >>> m = FisherSnedecor(torch.tensor([1.0]), torch.tensor([2.0]))
m.sample()  # Fisher-Snedecor-distributed with df1=1 and df2=2
      tensor([ 0.2453])



Parameters:
      * df1 (float or Tensor) -- degrees of freedom
        parameter 1
  * **df2** (*float** or **Tensor*) -- degrees of freedom
    parameter 2

arg_constraints = {'df1': GreaterThan(lower_bound=0.0), 'df2': GreaterThan(lower_bound=0.0)}
expand(batch_shape, _instance=None)
has_rsample = True
log_prob(value)
property mean
property mode
rsample(sample_shape=torch.Size([]))
support = GreaterThan(lower_bound=0.0)
property variance
Gamma
class torch.distributions.gamma.Gamma(concentration, rate, validate_args=None)
Bases: "ExponentialFamily"
Creates a Gamma distribution parameterized by shape "concentration"
   and "rate".
Example:
  >>> m = Gamma(torch.tensor([1.0]), torch.tensor([1.0]))
  >>> m.sample()  # Gamma distributed with concentration=1 and rate=1
  tensor([ 0.1046])

Parameters:
tensor([ 0.1046])
Parameters:
      * concentration (float or Tensor) -- shape parameter
        of the distribution (often referred to as alpha)
  * **rate** (*float** or **Tensor*) -- rate = 1 / scale of the
    distribution (often referred to as beta)

arg_constraints = {'concentration': GreaterThan(lower_bound=0.0), 'rate': GreaterThan(lower_bound=0.0)}
cdf(value)
entropy()
expand(batch_shape, _instance=None)
has_rsample = True
log_prob(value)
property mean
property mode
rsample(sample_shape=torch.Size([]))
support = GreaterThanEq(lower_bound=0.0)
property variance
Geometric
class torch.distributions.geometric.Geometric(probs=None, logits=None, validate_args=None)
Bases: "Distribution"
Creates a Geometric distribution parameterized by "probs", where
   "probs" is the probability of success of Bernoulli trials. It
   represents the probability that in k + 1 Bernoulli trials, the
first k trials failed, before seeing a success.
Samples are non-negative integers [0, \inf).
Example:
  >>> m = Geometric(torch.tensor([0.3]))
  >>> m.sample()  # underlying Bernoulli has 30% chance 1; 70% chance 0
  tensor([ 2.])

Parameters:
      * probs (Number, Tensor) -- the probability of
        sampling 1. Must be in range (0, 1]
  * **logits** (*Number**, **Tensor*) -- the log-odds of sampling
    *1*.

arg_constraints = {'logits': Real(), 'probs': Interval(lower_bound=0.0, upper_bound=1.0)}
entropy()
expand(batch_shape, _instance=None)
log_prob(value)
property logits
property mean
property mode
property probs
sample(sample_shape=torch.Size([]))
support = IntegerGreaterThan(lower_bound=0)
property variance
Gumbel
class torch.distributions.gumbel.Gumbel(loc, scale, validate_args=None)
Bases: "TransformedDistribution"
Samples from a Gumbel Distribution.
Examples:
Examples:
  >>> m = Gumbel(torch.tensor([1.0]), torch.tensor([2.0]))
  >>> m.sample()  # sample from Gumbel distribution with loc=1, scale=2
  tensor([ 1.0124])

Parameters:
      * loc (float or Tensor) -- Location parameter of the
        distribution
  * **scale** (*float** or **Tensor*) -- Scale parameter of the
    distribution

arg_constraints: Dict[str, constraints.Constraint] = {'loc': Real(), 'scale': GreaterThan(lower_bound=0.0)}
entropy()
expand(batch_shape, _instance=None)
log_prob(value)
property mean
property mode
property stddev
support = Real()
property variance
HalfCauchy
class torch.distributions.half_cauchy.HalfCauchy(scale, validate_args=None)
Bases: "TransformedDistribution"
Creates a half-Cauchy distribution parameterized by scale where:
  X ~ Cauchy(0, scale)
  Y = |X| ~ HalfCauchy(scale)

Example:
  >>> m = HalfCauchy(torch.tensor([1.0]))
m = HalfCauchy(torch.tensor([1.0]))
      >>> m.sample()  # half-cauchy distributed with scale=1
      tensor([ 2.3214])



Parameters:
      scale (float or Tensor) -- scale of the full Cauchy
      distribution
arg_constraints: Dict[str, constraints.Constraint] = {'scale': GreaterThan(lower_bound=0.0)}
cdf(value)
entropy()
expand(batch_shape, _instance=None)
has_rsample = True
icdf(prob)
log_prob(value)
property mean
property mode
property scale
support = GreaterThanEq(lower_bound=0.0)
property variance
HalfNormal
class torch.distributions.half_normal.HalfNormal(scale, validate_args=None)
Bases: "TransformedDistribution"
Creates a half-normal distribution parameterized by scale where:
  X ~ Normal(0, scale)
  Y = |X| ~ HalfNormal(scale)

Example:
  >>> m = HalfNormal(torch.tensor([1.0]))
  >>> m.sample()  # half-normal distributed with scale=1
  tensor([ 0.1046])

Parameters:
tensor([ 0.1046])
Parameters:
      scale (float or Tensor) -- scale of the full Normal
      distribution
arg_constraints: Dict[str, constraints.Constraint] = {'scale': GreaterThan(lower_bound=0.0)}
cdf(value)
entropy()
expand(batch_shape, _instance=None)
has_rsample = True
icdf(prob)
log_prob(value)
property mean
property mode
property scale
support = GreaterThanEq(lower_bound=0.0)
property variance
Independent
class torch.distributions.independent.Independent(base_distribution, reinterpreted_batch_ndims, validate_args=None)
Bases: "Distribution"
Reinterprets some of the batch dims of a distribution as event
   dims.
This is mainly useful for changing the shape of the result of
   "log_prob()". For example to create a diagonal Normal distribution
   with the same shape as a Multivariate Normal distribution (so they
   are interchangeable), you can:
are interchangeable), you can:
  >>> from torch.distributions.multivariate_normal import MultivariateNormal
  >>> from torch.distributions.normal import Normal
  >>> loc = torch.zeros(3)
  >>> scale = torch.ones(3)
  >>> mvn = MultivariateNormal(loc, scale_tril=torch.diag(scale))
  >>> [mvn.batch_shape, mvn.event_shape]
  [torch.Size([]), torch.Size([3])]
  >>> normal = Normal(loc, scale)
  >>> [normal.batch_shape, normal.event_shape]
  [torch.Size([3]), torch.Size([])]
  >>> diagn = Independent(normal, 1)
  >>> [diagn.batch_shape, diagn.event_shape]
  [torch.Size([]), torch.Size([3])]

Parameters:
      * base_distribution
        (torch.distributions.distribution.Distribution) -- a base
        distribution
  * **reinterpreted_batch_ndims** (*int*) -- the number of batch
    dims to reinterpret as event dims

arg_constraints: Dict[str, Constraint] = {}
entropy()
enumerate_support(expand=True)
entropy()
enumerate_support(expand=True)
expand(batch_shape, _instance=None)
property has_enumerate_support
property has_rsample
log_prob(value)
property mean
property mode
rsample(sample_shape=torch.Size([]))
sample(sample_shape=torch.Size([]))
property support
property variance
Kumaraswamy
class torch.distributions.kumaraswamy.Kumaraswamy(concentration1, concentration0, validate_args=None)
Bases: "TransformedDistribution"
Samples from a Kumaraswamy distribution.
Example:
  >>> m = Kumaraswamy(torch.tensor([1.0]), torch.tensor([1.0]))
  >>> m.sample()  # sample from a Kumaraswamy distribution with concentration alpha=1 and beta=1
  tensor([ 0.1729])

Parameters:
      * concentration1 (float or Tensor) -- 1st
        concentration parameter of the distribution (often referred to
        as alpha)
  * **concentration0** (*float** or **Tensor*) -- 2nd
concentration parameter of the distribution (often referred to
        as beta)
arg_constraints: Dict[str, constraints.Constraint] = {'concentration0': GreaterThan(lower_bound=0.0), 'concentration1': GreaterThan(lower_bound=0.0)}
entropy()
expand(batch_shape, _instance=None)
has_rsample = True
property mean
property mode
support = Interval(lower_bound=0.0, upper_bound=1.0)
property variance
LKJCholesky
class torch.distributions.lkj_cholesky.LKJCholesky(dim, concentration=1.0, validate_args=None)
Bases: "Distribution"
LKJ distribution for lower Cholesky factor of correlation matrices.
   The distribution is controlled by "concentration" parameter \eta to
   make the probability of the correlation matrix M generated from a
   Cholesky factor proportional to \det(M)^{\eta - 1}. Because of
   that, when "concentration == 1", we have a uniform distribution
   over Cholesky factors of correlation matrices:
  L ~ LKJCholesky(dim, concentration)
L ~ LKJCholesky(dim, concentration)
      X = L @ L' ~ LKJCorr(dim, concentration)
Note that this distribution samples the Cholesky factor of
   correlation matrices and not the correlation matrices themselves
   and thereby differs slightly from the derivations in [1] for the
   LKJCorr distribution. For sampling, this uses the Onion method
   from [1] Section 3.
Example:
  >>> l = LKJCholesky(3, 0.5)
  >>> l.sample()  # l @ l.T is a sample of a correlation 3x3 matrix
  tensor([[ 1.0000,  0.0000,  0.0000],
          [ 0.3516,  0.9361,  0.0000],
          [-0.1899,  0.4748,  0.8593]])

Parameters:
      * dimension (dim) -- dimension of the matrices
  * **concentration** (*float** or **Tensor*) --
    concentration/shape parameter of the distribution (often
    referred to as eta)

References
[1] Generating random correlation matrices based on vines and
   extended onion method (2009), Daniel Lewandowski, Dorota
Kurowicka, Harry Joe. Journal of Multivariate Analysis. 100.
   10.1016/j.jmva.2009.04.008
arg_constraints = {'concentration': GreaterThan(lower_bound=0.0)}
expand(batch_shape, _instance=None)
log_prob(value)
sample(sample_shape=torch.Size([]))
support = CorrCholesky()
Laplace
class torch.distributions.laplace.Laplace(loc, scale, validate_args=None)
Bases: "Distribution"
Creates a Laplace distribution parameterized by "loc" and "scale".
Example:
  >>> m = Laplace(torch.tensor([0.0]), torch.tensor([1.0]))
  >>> m.sample()  # Laplace distributed with loc=0, scale=1
  tensor([ 0.1046])

Parameters:
      * loc (float or Tensor) -- mean of the distribution
  * **scale** (*float** or **Tensor*) -- scale of the distribution

arg_constraints = {'loc': Real(), 'scale': GreaterThan(lower_bound=0.0)}
cdf(value)
entropy()
expand(batch_shape, _instance=None)
has_rsample = True
icdf(value)
log_prob(value)
icdf(value)
log_prob(value)
property mean
property mode
rsample(sample_shape=torch.Size([]))
property stddev
support = Real()
property variance
LogNormal
class torch.distributions.log_normal.LogNormal(loc, scale, validate_args=None)
Bases: "TransformedDistribution"
Creates a log-normal distribution parameterized by "loc" and
   "scale" where:
  X ~ Normal(loc, scale)
  Y = exp(X) ~ LogNormal(loc, scale)

Example:
  >>> m = LogNormal(torch.tensor([0.0]), torch.tensor([1.0]))
  >>> m.sample()  # log-normal distributed with mean=0 and stddev=1
  tensor([ 0.1046])

Parameters:
      * loc (float or Tensor) -- mean of log of distribution
  * **scale** (*float** or **Tensor*) -- standard deviation of log
    of the distribution

arg_constraints: Dict[str, constraints.Constraint] = {'loc': Real(), 'scale': GreaterThan(lower_bound=0.0)}
entropy()
expand(batch_shape, _instance=None)
has_rsample = True
has_rsample = True
property loc
property mean
property mode
property scale
support = GreaterThan(lower_bound=0.0)
property variance
LowRankMultivariateNormal
class torch.distributions.lowrank_multivariate_normal.LowRankMultivariateNormal(loc, cov_factor, cov_diag, validate_args=None)
Bases: "Distribution"
Creates a multivariate normal distribution with covariance matrix
   having a low-rank form parameterized by "cov_factor" and
   "cov_diag":
  covariance_matrix = cov_factor @ cov_factor.T + cov_diag

-[ Example ]-



m = LowRankMultivariateNormal(torch.zeros(2), torch.tensor([[1.], [0.]]), torch.ones(2))
m.sample()  # normally distributed with mean=[0,0], cov_factor=[[1],[0]], cov_diag=[1,1]
   tensor([-0.2102, -0.5429])



Parameters:
      * loc (Tensor) -- mean of the distribution with shape
        batch_shape + event_shape
  * **cov_factor** (*Tensor*) -- factor part of low-rank form of
covariance matrix with shape batch_shape + event_shape +
        (rank,)
  * **cov_diag** (*Tensor*) -- diagonal part of low-rank form of
    covariance matrix with shape *batch_shape + event_shape*

Note:
 The computation for determinant and inverse of covariance matrix
 is avoided when *cov_factor.shape[1] << cov_factor.shape[0]*
 thanks to Woodbury matrix identity and matrix determinant lemma.
 Thanks to these formulas, we just need to compute the determinant
 and inverse of the small size "capacitance" matrix:

    capacitance = I + cov_factor.T @ inv(cov_diag) @ cov_factor

arg_constraints = {'cov_diag': IndependentConstraint(GreaterThan(lower_bound=0.0), 1), 'cov_factor': IndependentConstraint(Real(), 2), 'loc': IndependentConstraint(Real(), 1)}
property covariance_matrix
entropy()
expand(batch_shape, _instance=None)
has_rsample = True
log_prob(value)
property mean
property mode
property precision_matrix
property mode
property precision_matrix
rsample(sample_shape=torch.Size([]))
property scale_tril
support = IndependentConstraint(Real(), 1)
property variance
MixtureSameFamily
class torch.distributions.mixture_same_family.MixtureSameFamily(mixture_distribution, component_distribution, validate_args=None)
Bases: "Distribution"
The MixtureSameFamily distribution implements a (batch of)
   mixture distribution where all component are from different
   parameterizations of the same distribution type. It is
   parameterized by a Categorical "selecting distribution" (over k
   component) and a component distribution, i.e., a Distribution
   with a rightmost batch shape (equal to [k]) which indexes each
   (batch of) component.
Examples:
  >>> # Construct Gaussian Mixture Model in 1D consisting of 5 equally
  >>> # weighted normal distributions
  >>> mix = D.Categorical(torch.ones(5,))
mix = D.Categorical(torch.ones(5,))
      >>> comp = D.Normal(torch.randn(5,), torch.rand(5,))
      >>> gmm = MixtureSameFamily(mix, comp)



  >>> # Construct Gaussian Mixture Modle in 2D consisting of 5 equally
  >>> # weighted bivariate normal distributions
  >>> mix = D.Categorical(torch.ones(5,))
  >>> comp = D.Independent(D.Normal(
  ...          torch.randn(5,2), torch.rand(5,2)), 1)
  >>> gmm = MixtureSameFamily(mix, comp)

  >>> # Construct a batch of 3 Gaussian Mixture Models in 2D each
  >>> # consisting of 5 random weighted bivariate normal distributions
  >>> mix = D.Categorical(torch.rand(3,5))
  >>> comp = D.Independent(D.Normal(
  ...         torch.randn(3,5,2), torch.rand(3,5,2)), 1)
  >>> gmm = MixtureSameFamily(mix, comp)

Parameters:
      * mixture_distribution --
        torch.distributions.Categorical-like instance. Manages the
        probability of selecting component. The number of categories
must match the rightmost batch dimension of the
        component_distribution. Must have either scalar
        batch_shape or batch_shape matching
        component_distribution.batch_shape[:-1]
  * **component_distribution** --
    *torch.distributions.Distribution*-like instance. Right-most
    batch dimension indexes component.

arg_constraints: Dict[str, Constraint] = {}
cdf(x)
property component_distribution
expand(batch_shape, _instance=None)
has_rsample = False
log_prob(x)
property mean
property mixture_distribution
sample(sample_shape=torch.Size([]))
property support
property variance
Multinomial
class torch.distributions.multinomial.Multinomial(total_count=1, probs=None, logits=None, validate_args=None)
Bases: "Distribution"
Creates a Multinomial distribution parameterized by "total_count"
   and either "probs" or "logits" (but not both). The innermost
dimension of "probs" indexes over categories. All other dimensions
   index over batches.
Note that "total_count" need not be specified if only "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. "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. "logits" will return this normalized
 value.



"sample()" requires a single shared total_count for all
     parameters and samples.


"log_prob()" allows different total_count for each parameter
     and sample.


Example:
  >>> 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])

Parameters:
      * total_count (int) -- number of trials
  * **probs** (*Tensor*) -- event probabilities

  * **logits** (*Tensor*) -- event log probabilities
    (unnormalized)

arg_constraints = {'logits': IndependentConstraint(Real(), 1), 'probs': Simplex()}
entropy()
expand(batch_shape, _instance=None)
log_prob(value)
property logits
property mean
property param_shape
property probs
sample(sample_shape=torch.Size([]))
property support
total_count: int
property variance
MultivariateNormal
class torch.distributions.multivariate_normal.MultivariateNormal(loc, covariance_matrix=None, precision_matrix=None, scale_tril=None, validate_args=None)
Bases: "Distribution"
Creates a multivariate normal (also called Gaussian) distribution
parameterized by a mean vector and a covariance matrix.
The multivariate normal distribution can be parameterized either in
   terms of a positive definite covariance matrix \mathbf{\Sigma} or a
   positive definite precision matrix \mathbf{\Sigma}^{-1} or a lower-
   triangular matrix \mathbf{L} with positive-valued diagonal entries,
   such that \mathbf{\Sigma} = \mathbf{L}\mathbf{L}^\top. This
   triangular matrix can be obtained via e.g. Cholesky decomposition
   of the covariance.
-[ Example ]-



m = MultivariateNormal(torch.zeros(2), torch.eye(2))
m.sample()  # normally distributed with mean=[0,0] and covariance_matrix=I
   tensor([-0.2102, -0.5429])



Parameters:
      * loc (Tensor) -- mean of the distribution
  * **covariance_matrix** (*Tensor*) -- positive-definite
    covariance matrix

  * **precision_matrix** (*Tensor*) -- positive-definite precision
    matrix

  * **scale_tril** (*Tensor*) -- lower-triangular factor of
covariance, with positive-valued diagonal
Note:
 Only one of "covariance_matrix" or "precision_matrix" or
 "scale_tril" can be specified.Using "scale_tril" will be more
 efficient: all computations internally are based on "scale_tril".
 If "covariance_matrix" or "precision_matrix" is passed instead,
 it is only used to compute the corresponding lower triangular
 matrices using a Cholesky decomposition.

arg_constraints = {'covariance_matrix': PositiveDefinite(), 'loc': IndependentConstraint(Real(), 1), 'precision_matrix': PositiveDefinite(), 'scale_tril': LowerCholesky()}
property covariance_matrix
entropy()
expand(batch_shape, _instance=None)
has_rsample = True
log_prob(value)
property mean
property mode
property precision_matrix
rsample(sample_shape=torch.Size([]))
property scale_tril
support = IndependentConstraint(Real(), 1)
property variance
NegativeBinomial
NegativeBinomial
class torch.distributions.negative_binomial.NegativeBinomial(total_count, probs=None, logits=None, validate_args=None)
Bases: "Distribution"
Creates a Negative Binomial distribution, i.e. distribution of the
   number of successful independent and identical Bernoulli trials
   before "total_count" failures are achieved. The probability of
   success of each Bernoulli trial is "probs".
Parameters:
      * total_count (float or Tensor) -- non-negative number
        of negative Bernoulli trials to stop, although the
        distribution is still valid for real valued count
  * **probs** (*Tensor*) -- Event probabilities of success in the
    half open interval [0, 1)

  * **logits** (*Tensor*) -- Event log-odds for probabilities of
    success

arg_constraints = {'logits': Real(), 'probs': HalfOpenInterval(lower_bound=0.0, upper_bound=1.0), 'total_count': GreaterThanEq(lower_bound=0)}
expand(batch_shape, _instance=None)
expand(batch_shape, _instance=None)
log_prob(value)
property logits
property mean
property mode
property param_shape
property probs
sample(sample_shape=torch.Size([]))
support = IntegerGreaterThan(lower_bound=0)
property variance
Normal
class torch.distributions.normal.Normal(loc, scale, validate_args=None)
Bases: "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 or Tensor) -- mean of the distribution
        (often referred to as mu)
  * **scale** (*float** or **Tensor*) -- standard deviation of the
    distribution (often referred to as sigma)

arg_constraints = {'loc': Real(), 'scale': GreaterThan(lower_bound=0.0)}
cdf(value)
entropy()
cdf(value)
entropy()
expand(batch_shape, _instance=None)
has_rsample = True
icdf(value)
log_prob(value)
property mean
property mode
rsample(sample_shape=torch.Size([]))
sample(sample_shape=torch.Size([]))
property stddev
support = Real()
property variance
OneHotCategorical
class torch.distributions.one_hot_categorical.OneHotCategorical(probs=None, logits=None, validate_args=None)
Bases: "Distribution"
Creates a one-hot categorical distribution parameterized by "probs"
   or "logits".
Samples are one-hot coded vectors of size "probs.size(-1)".
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. "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