class_docstr: The Deep Graph Infomax model from the
  `"Deep Graph Infomax" <https://arxiv.org/abs/1809.10341>`_
  paper based on user-defined encoder and summary model :math:`\mathcal{E}`
  and :math:`\mathcal{R}` respectively, and a corruption function
  :math:`\mathcal{C}`.
  
  Args:
      hidden_channels (int): The latent space dimensionality.
      encoder (torch.nn.Module): The encoder module :math:`\mathcal{E}`.
      summary (callable): The readout function :math:`\mathcal{R}`.
      corruption (callable): The corruption function :math:`\mathcal{C}`.
class_docstr_tok: ["The","Deep","Graph","Infomax","model","from","the","`","``","Deep","Graph","Infomax","''","<","https",":","\/\/arxiv.org\/abs\/1809.10341",">","`","_","paper","based","on","user-defined","encoder","and","summary","model",":","math",":","`","\\mathcal","{","E","}","`","and",":","math",":","`","\\mathcal","{","R","}","`","respectively",",","and","a","corruption","function",":","math",":","`","\\mathcal","{","C","}","`",".","Args",":","hidden_channels","(","int",")",":","The","latent","space","dimensionality",".","encoder","(","torch.nn.Module",")",":","The","encoder","module",":","math",":","`","\\mathcal","{","E","}","`",".","summary","(","callable",")",":","The","readout","function",":","math",":","`","\\mathcal","{","R","}","`",".","corruption","(","callable",")",":","The","corruption","function",":","math",":","`","\\mathcal","{","C","}","`","."]
docstr: Returns the latent space for the input arguments, their
  corruptions and their summary representation.
docstr_tok: ["Returns","the","latent","space","for","the","input","arguments",",","their","corruptions","and","their","summary","representation","."]
code: def forward(self, *args, **kwargs) -> Tuple[Tensor, Tensor, Tensor]:
      """Returns the latent space for the input arguments, their
      corruptions and their summary representation.
      """
      pos_z = self.encoder(*args, **kwargs)
  
      cor = self.corruption(*args, **kwargs)
      cor = cor if isinstance(cor, tuple) else (cor,)
      cor_args = cor[: len(args)]
      cor_kwargs = copy.copy(kwargs)
      for key, value in zip(kwargs.keys(), cor[len(args) :]):
          cor_kwargs[key] = value
  
      neg_z = self.encoder(*cor_args, **cor_kwargs)
  
      summary = self.summary(pos_z, *args, **kwargs)
  
      return pos_z, neg_z, summary
  
file_path: pytorch_geometric/torch_geometric/nn/models/deep_graph_infomax.py
imports: import copy
  from typing import Callable, Tuple
  import torch
  from torch import Tensor
  from torch.nn import Module, Parameter
  from torch_geometric.nn.inits import reset, uniform
label_desc: Use image node_id 3 for calling the DeepGraphInfomax obj's underlying member method code with example usage: obj.forward() and returns: pos_z,  neg_z,  summary