InverseModel.forward

InverseModel.forward(data: Tuple[torch.Tensor, torch.Tensor]) Dict[str, torch.Tensor][source]

Obtains latent vectors z according to self.gen_z_strategy, then decodes the data to obtain x_hat and finally encodes x_hat using the (frozen) encoder to obtain y_hat.

Parameters:

data (Tuple[torch.Tensor, torch.Tensor]) – The training data containing x and y.

Returns:

Dict[str, torch.Tensor] – Prediction