torch_geometric.nn.models.ARGA
- class ARGA(encoder: Module, discriminator: Module, decoder: Optional[Module] = None)[source]
Bases:
GAE
The Adversarially Regularized Graph Auto-Encoder model from the “Adversarially Regularized Graph Autoencoder for Graph Embedding” paper.
- Parameters:
encoder (torch.nn.Module) – The encoder module.
discriminator (torch.nn.Module) – The discriminator module.
decoder (torch.nn.Module, optional) – The decoder module. If set to
None
, will default to thetorch_geometric.nn.models.InnerProductDecoder
. (default:None
)
- reg_loss(z: Tensor) Tensor [source]
Computes the regularization loss of the encoder.
- Parameters:
z (torch.Tensor) – The latent space \(\mathbf{Z}\).
- discriminator_loss(z: Tensor) Tensor [source]
Computes the loss of the discriminator.
- Parameters:
z (torch.Tensor) – The latent space \(\mathbf{Z}\).