Bases: torch.distributions.transforms.Transform

Volume preserving transformation to the Beta distribution support.

bijective = True
codomain: torch.distributions.constraints.Constraint = IndependentConstraint(Real(), 1)
domain: torch.distributions.constraints.Constraint = Real()

Infers the shape of the forward computation, given the input shape. Defaults to preserving shape.


Infers the shapes of the inverse computation, given the output shape. Defaults to preserving shape.

log_abs_det_jacobian(x, y)

Computes the log det jacobian log |dy/dx| given input and output. torch.distributions.distribution.Distribution) torch.distributions.transforms.Transform

Get transforms of a distribution to transform it from constrained space into unconstrained space.


distribution – the distribution to check


a Transform that need to be applied to the distribution to transform it from constrained space into unconstrained space torch.distributions.distribution.Distribution, initialize_from_prior: bool = False)

Initialized the Variable value


initialize_from_prior – if true, returns sample from prior


the value to the set the Variable value to Union[torch.distributions.constraints.Constraint, Type], check_constraints: Union[torch.distributions.constraints.Constraint, Type]) bool Union[torch.distributions.constraints.Constraint, Type], check_constraints: Iterable[Union[torch.distributions.constraints.Constraint, Type]]) Iterable[bool]

This provides an equality check that works for different constraints specified in torch.distributions.constraints. If constraint is constraints.Independent, then the base_constraint is checked. If check_constraints is a single Constraint type or instance this returns a True if the given constraint matches check_constraints. Otherwise, if check_constraints is an iterable, this returns a bool list that represents an element-wise check.

  • constraint – A constraint class or instance.

  • check_constraints – A constraint class or instance or an iterable containing constraint classes or instances to check against.


bool (or a list of bool) values indicating if the given constraint equals the constraint in check_constraints.