class_docstr: Contrastive learning method proposed in the paper `InfoGraph: Unsupervised and 
  Semi-supervised Graph-Level Representation Learning via Mutual Information 
  Maximization <https://arxiv.org/abs/1908.01000>`_. You can refer to `the benchmark code 
  <https://github.com/divelab/DIG/blob/dig/benchmarks/sslgraph/example_infograph.ipynb>`_ 
  for an example of usage.
  
  *Alias*: :obj:`dig.sslgraph.method.contrastive.model.`:obj:`InfoGraph`.
  
  Args:
      g_dim (int): The embedding dimension for graph-level (global) representations.
      n_dim (int): The embedding dimension for node-level (local) representations. Typically,
          when jumping knowledge is included in the encoder, we have 
          :obj:`g_dim` = :obj:`n_layers` * :obj:`n_dim`.
      **kwargs (optinal): Additional arguments of :class:`dig.sslgraph.method.Contrastive`.
code: def train(
      self,
      encoders,
      data_loader,
      optimizer,
      epochs,
      per_epoch_out=False,
  ):
      for enc, (proj, proj_n) in super(InfoGraph, self).train(
          encoders, data_loader, optimizer, epochs, per_epoch_out
      ):
          yield InfoG_enc(enc, self.z_dim, self.z_n_dim)
  
file_path: DIG/dig/sslgraph/method/contrastive/model/infograph.py
imports: import torch.nn
  from .contrastive import Contrastive
label_desc: Use image node_id 2 for calling the InfoGraph obj's underlying member method code with example usage: obj.train(encoders, data_loader, optimizer, epochs, per_epoch_out) without return types