class_docstr: The Grouped Reversible GNN module from the `"Graph Neural Networks with
  1000 Layers" <https://arxiv.org/abs/2106.07476>`_ paper.
  This module enables training of arbitary deep GNNs with a memory complexity
  independent of the number of layers.
  
  It does so by partitioning input node features :math:`\mathbf{X}` into
  :math:`C` groups across the feature dimension. Then, a grouped reversible
  GNN block :math:`f_{\theta(i)}` operates on a group of inputs and produces
  a group of outputs:
  
  .. math::
  
      \mathbf{X}^{\prime}_0 &= \sum_{i=2}^C \mathbf{X}_i
  
      \mathbf{X}^{\prime}_i &= f_{\theta(i)} ( \mathbf{X}^{\prime}_{i - 1},
      \mathbf{A}) + \mathbf{X}_i
  
  for all :math:`i \in \{ 1, \ldots, C \}`.
  
  .. note::
  
      For an example of using :class:`GroupAddRev`, see `examples/rev_gnn.py
      <https://github.com/pyg-team/pytorch_geometric/blob/master/examples/
      rev_gnn.py>`_.
  
  Args:
      conv (torch.nn.Module or torch.nn.ModuleList]): A seed GNN. The input
          and output feature dimensions need to match.
      split_dim (int, optional): The dimension across which to split groups.
          (default: :obj:`-1`)
      num_groups (int, optional): The number of groups :math:`C`.
          (default: :obj:`None`)
      disable (bool, optional): If set to :obj:`True`, will disable the usage
          of :class:`InvertibleFunction` and will execute the module without
          memory savings. (default: :obj:`False`)
      num_bwd_passes (int, optional): Number of backward passes to retain a
          link with the output. After the last backward pass the output is
          discarded and memory is freed. (default: :obj:`1`)
class_docstr_tok: ["The","Grouped","Reversible","GNN","module","from","the","`","``","Graph","Neural","Networks","with","1000","Layers","''","<","https",":","\/\/arxiv.org\/abs\/2106.07476",">","`","_","paper",".","This","module","enables","training","of","arbitary","deep","GNNs","with","a","memory","complexity","independent","of","the","number","of","layers",".","It","does","so","by","partitioning","input","node","features",":","math",":","`","\\mathbf","{","X","}","`","into",":","math",":","`","C","`","groups","across","the","feature","dimension",".","Then",",","a","grouped","reversible","GNN","block",":","math",":","`","f_","{","\\theta","(","i",")","}","`","operates","on","a","group","of","inputs","and","produces","a","group","of","outputs",":","..","math",":",":","\\mathbf","{","X","}","^","{","\\prime","}","_0","&","=","\\sum_","{","i=2","}","^C","\\mathbf","{","X","}","_i","\\mathbf","{","X","}","^","{","\\prime","}","_i","&","=","f_","{","\\theta","(","i",")","}","(","\\mathbf","{","X","}","^","{","\\prime","}","_","{","i","-","1","}",",","\\mathbf","{","A","}",")","+","\\mathbf","{","X","}","_i","for","all",":","math",":","`","i","\\in","\\","{","1",",","\\ldots",",","C","\\","}","`",".","..","note",":",":","For","an","example","of","using",":","class",":","`","GroupAddRev","`",",","see","`","examples\/rev_gnn.py","<","https",":","\/\/github.com\/pyg-team\/pytorch_geometric\/blob\/master\/examples\/","rev_gnn.py",">","`","_",".","Args",":","conv","(","torch.nn.Module","or","torch.nn.ModuleList","]",")",":","A","seed","GNN",".","The","input","and","output","feature","dimensions","need","to","match",".","split_dim","(","int",",","optional",")",":","The","dimension","across","which","to","split","groups",".","(","default",":",":","obj",":","`","-1","`",")","num_groups","(","int",",","optional",")",":","The","number","of","groups",":","math",":","`","C","`",".","(","default",":",":","obj",":","`","None","`",")","disable","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","True","`",",","will","disable","the","usage","of",":","class",":","`","InvertibleFunction","`","and","will","execute","the","module","without","memory","savings",".","(","default",":",":","obj",":","`","False","`",")","num_bwd_passes","(","int",",","optional",")",":","Number","of","backward","passes","to","retain","a","link","with","the","output",".","After","the","last","backward","pass","the","output","is","discarded","and","memory","is","freed",".","(","default",":",":","obj",":","`","1","`",")"]
code: def __repr__(self) -> str:
      return (
          f"{self.__class__.__name__}({self.convs[0]}, "
          f"num_groups={self.num_groups})"
      )
  
imports: import copy
  from abc import ABC, abstractmethod
  from typing import Any, List, Optional, Union
  import numpy
  import torch
  from torch import Tensor
  import torch_geometric.typing
  from torch_geometric.typing import Adj
label_desc: Use image node_id 7 for calling the GroupAddRev obj's underlying member method code with example usage: obj.__repr__() and returns: self, str, self, str, self, str