class, log_density=0.0, event_dim=0, validate_args=None)

Bases: torch.distributions.distribution.Distribution

arg_constraints = {'log_density': Real(), 'v': Real()}
property event_dim
expand(batch_shape, _instance=None)

Returns a new distribution instance (or populates an existing instance provided by a derived class) with batch dimensions expanded to batch_shape. This method calls expand on the distribution’s parameters. As such, this does not allocate new memory for the expanded distribution instance. Additionally, this does not repeat any args checking or parameter broadcasting in, when an instance is first created.

  • batch_shape (torch.Size) – the desired expanded size.

  • _instance – new instance provided by subclasses that need to override .expand.


New distribution instance with batch dimensions expanded to batch_size.

has_rsample = True

Returns the log of the probability density/mass function evaluated at value.


value (Tensor) –

property mean

Returns the mean of the distribution.


Generates a sample_shape shaped reparameterized sample or sample_shape shaped batch of reparameterized samples if the distribution parameters are batched.

support = Real()
property variance

Returns the variance of the distribution., dim)