Planar Flow

Implementation of Planar Flows (PlanarFlow) proposed in (https://arxiv.org/abs/1505.05770)

class pythae.models.normalizing_flows.PlanarFlowConfig(input_dim=None, activation='tanh')[source]

This is the PlanarFlow model configuration instance.

Parameters
  • input_dim (tuple) – The input data dimension. Default: None.

  • activation (str) – The activation function to be applied. Choices: [‘linear’, ‘tanh’, ‘elu’]. Default: ‘tanh’.

class pythae.models.normalizing_flows.PlanarFlow(model_config)[source]

Planar Flow model.

Parameters

model_config (PlanarFlowConfig) – The PlanarFlow model configuration setting the main parameters of the model.

forward(x, **kwargs)[source]

The input data is transformed toward the prior

Parameters

inputs (torch.Tensor) – An input tensor

Returns

An instance of ModelOutput containing all the relevant parameters

Return type

ModelOutput