Bijector(is_constant_jacobian=False, is_injective=True, name=None, dtype=None, param=None)¶
is_constant_jacobian (bool) – Whether the Bijector has constant derivative. Default: False.
is_injective (bool) – Whether the Bijector is a one-to-one mapping. Default: True.
name (str) – The name of the Bijector. Default: None.
dtype (mindspore.dtype) – The type of the distributions that the Bijector can operate on. Default: None.
param (dict) – The parameters used to initialize the Bijector. Default: None.
- Supported Platforms:
dtype of bijector represents the type of the distributions that the bijector could operate on. When dtype is None, there is no enforcement on the type of input value except that the input value has to be float type. During initialization, when dtype is None, there is no enforcement on the dtype of the parameters. All parameters should have the same float type, otherwise a TypeError will be raised. Specifically, the parameter type will follow the dtype of the input value, i.e. parameters of the bijector will be casted into the same type as input value when dtype`is None. When `dtype is specified, it is forcing the parameters and input value to be the same dtype as dtype. When the type of parameters or the type of the input value is not the same as dtype, a TypeError will be raised. Only subtype of mindspore.float_type can be used to specify bijector’s dtype.
Cast the parameter(s) of the bijector to be the same type of input_value.
construct(name, *args, **kwargs)¶
Override construct in Cell.
Names of supported functions include: ‘forward’, ‘inverse’, ‘forward_log_jacobian’, and ‘inverse_log_jacobian’.
forward(value, *args, **kwargs)¶
Forward transformation: transform the input value to another distribution.
forward_log_jacobian(value, *args, **kwargs)¶
Logarithm of the derivative of the forward transformation.
inverse(value, *args, **kwargs)¶
Inverse transformation: transform the input value back to the original distribution.
inverse_log_jacobian(value, *args, **kwargs)¶
Logarithm of the derivative of the inverse transformation.