Garfield.modules.compute_omics_recon_mmd_loss

Garfield.modules.compute_omics_recon_mmd_loss(source_features, target_features)[source]

Initializes Maximum Mean Discrepancy(MMD) between source_features and target_features.

  • Gretton, Arthur, et al. “A Kernel Two-Sample Test”. 2012.

Parameters:
  • source_features (torch.Tensor) – Tensor with shape [batch_size, z_dim]

  • target_features (torch.Tensor) – Tensor with shape [batch_size, z_dim]

Return type:

Returns the computed MMD between x and y.