trw.layers.autoencoder_convolutional_variational_conditional¶
Module Contents¶
Classes¶
Conditional Variational convolutional auto-encoder implementation |
- class trw.layers.autoencoder_convolutional_variational_conditional.AutoencoderConvolutionalVariationalConditional(input_shape: Union[torch.Size, List[int], Tuple[int, Ellipsis]], encoder: torch.nn.Module, decoder: torch.nn.Module, z_size: int, y_size: int, input_type=torch.float32)¶
Bases:
torch.nn.ModuleConditional Variational convolutional auto-encoder implementation
Most of the implementation is shared with regular variational convolutional auto-encoder.
The main difference if the auto-encoder is conditioned on a variable
y. The model learns a latent given y. In this implementation, the encoder is not usingy, only the decoder is aware of it. This is done by concatenating the latent variable calculated by the encoder andy.- encode(self, x)¶
- decode(self, mu, logvar, y, sample_parameters=None)¶
- sample_given_y(self, y)¶
- forward(self, x, y)¶