Skip to main content

flowtorch.bijectors.leakyrelu

class

flowtorch.bijectors.LeakyReLU

Inherits from: flowtorch.bijectors.fixed.Fixed
empty docstring
member

__init__

(self, params: Union[flowtorch.lazy.Lazy, NoneType] = None, *, shape: torch.Size, context_shape: Union[torch.Size, NoneType] = None) -> None
<empty docstring>
member

forward

(self, x: torch.Tensor, context: Union[torch.Tensor, NoneType] = None) -> torch.Tensor
<empty docstring>
member

forward_shape

(self, shape: torch.Size) -> torch.Size

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

member

inverse

(self, y: torch.Tensor, x: Union[torch.Tensor, NoneType] = None, context: Union[torch.Tensor, NoneType] = None) -> torch.Tensor
<empty docstring>
member

inverse_shape

(self, shape: torch.Size) -> torch.Size

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

member

log_abs_det_jacobian

(self, x: torch.Tensor, y: torch.Tensor, context: Union[torch.Tensor, NoneType] = None) -> torch.Tensor

Computes the log det jacobian `log |dy/dx|` given input and output.
By default, assumes a volume preserving bijection.

member

param_shapes

(self, shape: torch.Size) -> Sequence[torch.Size]

Given a base distribution, calculate the parameters for the transformation
of that distribution under this bijector. By default, no parameters are
set.