# Decoders

class multimodal_compare.models.decoders.Dec_CNN(latent_dim, data_dim, latent_private)

  Bases: `VaeDecoder`

  _is_full_backward_hook: bool | None
  forward(z)

    Forward pass

    Parameters:

      z (torch.tensor) – sampled latent vectors z

    Returns:

      output reconstructions, log variance

    Return type:

      tuple(torch.tensor, torch.tensor)

  training: bool

class multimodal_compare.models.decoders.Dec_FNN(latent_dim, data_dim, latent_private)

  Bases: `VaeDecoder`

  _is_full_backward_hook: bool | None
  forward(z)

    Forward pass

    Parameters:

      z (torch.tensor) – sampled latent vectors z

    Returns:

      output reconstructions, log variance

    Return type:

      tuple(torch.tensor, torch.tensor)

  training: bool

class multimodal_compare.models.decoders.Dec_MNIST(latent_dim, data_dim, latent_private)

  Bases: `VaeDecoder`

  _is_full_backward_hook: bool | None
  forward(z)

    Forward pass

    Parameters:

      z (torch.tensor) – sampled latent vectors z

    Returns:

      output reconstructions, log variance

    Return type:

      tuple(torch.tensor, torch.tensor)

  training: bool

class multimodal_compare.models.decoders.Dec_MNIST2(latent_dim, data_dim, latent_private, num_hidden_layers=1)

  Bases: `VaeDecoder`

  _is_full_backward_hook: bool | None
  forward(z)

    Forward pass

    Parameters:

      z (torch.tensor) – sampled latent vectors z

    Returns:

      output reconstructions, log variance

    Return type:

      tuple(torch.tensor, torch.tensor)

  training: bool

class multimodal_compare.models.decoders.Dec_PolyMNIST(latent_dim, data_dim, latent_private)

  Bases: `VaeDecoder`

  _is_full_backward_hook: bool | None
  forward(z)

    Forward pass

    Parameters:

      z (torch.tensor) – sampled latent vectors z

    Returns:

      output reconstructions, log variance

    Return type:

      tuple(torch.tensor, torch.tensor)

  training: bool

class multimodal_compare.models.decoders.Dec_SVHN(latent_dim, data_dim, latent_private)

  Bases: `VaeDecoder`

  _is_full_backward_hook: bool | None
  forward(z)

    Forward pass

    Parameters:

      z (torch.tensor) – sampled latent vectors z

    Returns:

      output reconstructions, log variance

    Return type:

      tuple(torch.tensor, torch.tensor)

  training: bool

class multimodal_compare.models.decoders.Dec_SVHN2(latent_dim, data_dim, latent_private)

  Bases: `VaeDecoder`

  _is_full_backward_hook: bool | None
  forward(z)

    Forward pass

    Parameters:

      z (torch.tensor) – sampled latent vectors z

    Returns:

      output reconstructions, log variance

    Return type:

      tuple(torch.tensor, torch.tensor)

  training: bool

class multimodal_compare.models.decoders.Dec_Transformer(latent_dim, data_dim, latent_private, ff_size=1024, num_layers=4, num_heads=2, dropout=0.1, activation='gelu')

  Bases: `VaeDecoder`

  _is_full_backward_hook: bool | None
  forward(batch)

    Forward pass

    Parameters:

      batch (list, torch.tensor) – list with sampled latent vectors z and (optionally) boolean masks for desired lengths

    Returns:

      output reconstructions, log variance

    Return type:

      tuple(torch.tensor, torch.tensor)

  training: bool

class multimodal_compare.models.decoders.Dec_TransformerIMG(latent_dim, data_dim, latent_private, ff_size=1024, num_layers=4, num_heads=4, dropout=0.1, activation='gelu')

  Bases: `VaeDecoder`

  _is_full_backward_hook: bool | None
  forward(batch)

    Forward pass

    Parameters:

      batch (list, torch.tensor) – list with sampled latent vectors z and (optionally) boolean masks for desired lengths

    Returns:

      output reconstructions, log variance

    Return type:

      tuple(torch.tensor, torch.tensor)

  training: bool

class multimodal_compare.models.decoders.Dec_TxtTransformer(latent_dim, data_dim, latent_private, ff_size=1024, num_layers=8, num_heads=2, dropout=0.1, activation='gelu')

  Bases: `VaeDecoder`

  _is_full_backward_hook: bool | None
  forward(batch)

    Forward pass

    Parameters:

      batch (list, torch.tensor) – list with sampled latent vectors z and (optionally) boolean masks for desired lengths

    Returns:

      output reconstructions, log variance

    Return type:

      tuple(torch.tensor, torch.tensor)

  training: bool

class multimodal_compare.models.decoders.Dec_VideoGPT(latent_dim, data_dim, latent_private, n_res_layers=4)

  Bases: `VaeDecoder`

  _is_full_backward_hook: bool | None
  forward(z)

    Forward pass

    Parameters:

      x (torch.tensor) – sampled latent vectors z

    Returns:

      output reconstructions, log variance

    Return type:

      tuple(torch.tensor, torch.tensor)

  training: bool

class multimodal_compare.models.decoders.VaeDecoder(latent_dim, data_dim, latent_private, net_type: NetworkTypes)

  Bases: `VaeComponent`

  _is_full_backward_hook: bool | None
  training: bool

multimodal_compare.models.decoders.extra_hidden_layer(hidden_dim)