class_docstr: Contrastive learning method for graph-level tasks proposed in the paper `Contrastive 
  Multi-View Representation Learning on Graphs (MVGRL) <https://arxiv.org/pdf/2006.05582v1.pdf>`_. 
  You can refer to `the benchmark code 
  <https://github.com/divelab/DIG/blob/dig/benchmarks/sslgraph/example_mvgrl.ipynb>`_ 
  for an example of usage.
  
  *Alias*: :obj:`dig.sslgraph.method.contrastive.model.`:obj:`MVGRL`.
      
  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`.
      diffusion_type (string, optional): Diffusion instantiation mode with two options:
          :obj:`"ppr"`: Personalized PageRank. 
          :obj:`"heat"`: heat kernel. 
          (default: :obj:`"ppr"`)
      alpha (float, optional): Teleport probability in a random walk. (default: :obj:`0.2`)
      t (int, optinal): Diffusion time. (default: :obj:`5`)
class_docstr_tok: ["Contrastive","learning","method","for","graph-level","tasks","proposed","in","the","paper","`","Contrastive","Multi-View","Representation","Learning","on","Graphs","(","MVGRL",")","<","https",":","\/\/arxiv.org\/pdf\/2006.05582v1.pdf",">","`","_",".","You","can","refer","to","`","the","benchmark","code","<","https",":","\/\/github.com\/divelab\/DIG\/blob\/dig\/benchmarks\/sslgraph\/example_mvgrl.ipynb",">","`","_","for","an","example","of","usage",".","*","Alias","*",":",":","obj",":","`","dig.sslgraph.method.contrastive.model.","`",":","obj",":","`","MVGRL","`",".","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","`",".","diffusion_type","(","string",",","optional",")",":","Diffusion","instantiation","mode","with","two","options",":",":","obj",":","`","``","ppr","''","`",":","Personalized","PageRank",".",":","obj",":","`","``","heat","''","`",":","heat","kernel",".","(","default",":",":","obj",":","`","``","ppr","''","`",")","alpha","(","float",",","optional",")",":","Teleport","probability","in","a","random","walk",".","(","default",":",":","obj",":","`","0.2","`",")","t","(","int",",","optinal",")",":","Diffusion","time",".","(","default",":",":","obj",":","`","5","`",")"]
code: def __init__(
      self, g_dim, n_dim, diffusion_type="ppr", alpha=0.2, t=5, **kwargs
  ):
      self.views_fn = [
          lambda x: x,
          Diffusion(mode=diffusion_type, alpha=alpha, t=t),
      ]
      super(MVGRL, self).__init__(
          objective="JSE",
          views_fn=self.views_fn,
          node_level=True,
          z_dim=g_dim,
          z_n_dim=n_dim,
          proj=ProjHead(g_dim, n_dim),
          proj_n=ProjHead(n_dim, n_dim),
          **kwargs,
      )
  
file_path: DIG/dig/sslgraph/method/contrastive/model/mvgrl.py
imports: import torch.nn
  from .contrastive import Contrastive
  from dig.sslgraph.method.contrastive.views_fn import Diffusion, DiffusionWithSample
label_desc: Use image node_id 1 to create a new MVGRL object from inherited base classes: Contrastive with example: obj = MVGRL(g_dim, n_dim, diffusion_type, alpha, t)