class_docstr: Contrastive learning method for node-level tasks proposed in the paper `Contrastive 
  Multi-View Representation Learning on Graphs (MVGRL) <https://arxiv.org/pdf/2006.05582v1.pdf>`_. 
  
  *Alias*: :obj:`dig.sslgraph.method.contrastive.model.`:obj:`NodeMVGRL`.
  
  Args:
      z_g_dim (int): The embedding dimension for graph-level (global) representations.
      z_n_dim (int): The embedding dimension for node-level (local) representations. Typically,
          when jumping knowledge is included in the encoder, we have 
          :obj:`z_g_dim` = :obj:`n_layers` * :obj:`z_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`)
      batch_size (int, optinal): Number of subgraph samples in each minibatch. (default: :obj:`2`)
      num_nodes (int, optinal): Number of nodes sampled in each subgraph. (default: :obj:`2000`)
class_docstr_tok: ["Contrastive","learning","method","for","node-level","tasks","proposed","in","the","paper","`","Contrastive","Multi-View","Representation","Learning","on","Graphs","(","MVGRL",")","<","https",":","\/\/arxiv.org\/pdf\/2006.05582v1.pdf",">","`","_",".","*","Alias","*",":",":","obj",":","`","dig.sslgraph.method.contrastive.model.","`",":","obj",":","`","NodeMVGRL","`",".","Args",":","z_g_dim","(","int",")",":","The","embedding","dimension","for","graph-level","(","global",")","representations",".","z_n_dim","(","int",")",":","The","embedding","dimension","for","node-level","(","local",")","representations",".","Typically",",","when","jumping","knowledge","is","included","in","the","encoder",",","we","have",":","obj",":","`","z_g_dim","`","=",":","obj",":","`","n_layers","`","*",":","obj",":","`","z_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","`",")","batch_size","(","int",",","optinal",")",":","Number","of","subgraph","samples","in","each","minibatch",".","(","default",":",":","obj",":","`","2","`",")","num_nodes","(","int",",","optinal",")",":","Number","of","nodes","sampled","in","each","subgraph",".","(","default",":",":","obj",":","`","2000","`",")"]
code: def __init__(
      self,
      z_dim,
      z_n_dim,
      diffusion_type="ppr",
      alpha=0.2,
      t=5,
      batch_size=2,
      num_nodes=2000,
      **kwargs,
  ):
      self.mode = diffusion_type
      self.alpha = alpha
      self.t = t
      views_fn = [
          DiffusionWithSample(
              num_nodes,
              batch_size,
              mode=self.mode,
              alpha=self.alpha,
              t=self.t,
          ),
          None,
      ]
  
      super(NodeMVGRL, self).__init__(
          objective="JSE",
          views_fn=views_fn,
          node_level=True,
          z_dim=z_dim,
          z_n_dim=z_n_dim,
          proj="MLP",
          proj_n="linear",
          neg_by_crpt=True,
          **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 NodeMVGRL object from inherited base classes: Contrastive with example: obj = NodeMVGRL(z_dim, z_n_dim, diffusion_type, alpha, t, batch_size, num_nodes)