class_docstr: The relational graph convolutional operator from the `"Modeling
  Relational Data with Graph Convolutional Networks"
  <https://arxiv.org/abs/1703.06103>`_ paper.
  
  :class:`CuGraphRGCNConv` is an optimized version of
  :class:`~torch_geometric.nn.conv.RGCNConv` based on the :obj:`cugraph-ops`
  package that fuses message passing computation for accelerated execution
  and lower memory footprint.
class_docstr_tok: ["The","relational","graph","convolutional","operator","from","the","`","``","Modeling","Relational","Data","with","Graph","Convolutional","Networks","''","<","https",":","\/\/arxiv.org\/abs\/1703.06103",">","`","_","paper",".",":","class",":","`","CuGraphRGCNConv","`","is","an","optimized","version","of",":","class",":","`","~torch_geometric.nn.conv.RGCNConv","`","based","on","the",":","obj",":","`","cugraph-ops","`","package","that","fuses","message","passing","computation","for","accelerated","execution","and","lower","memory","footprint","."]
code: def __init__(
      self,
      in_channels: int,
      out_channels: int,
      num_relations: int,
      num_bases: Optional[int] = None,
      aggr: str = "mean",
      root_weight: bool = True,
      bias: bool = True,
  ):
      super().__init__()
  
      if aggr not in ["sum", "add", "mean"]:
          raise ValueError(
              f"Aggregation function must be either 'mean' "
              f"or 'sum' (got '{aggr}')"
          )
  
      self.in_channels = in_channels
      self.out_channels = out_channels
      self.num_relations = num_relations
      self.num_bases = num_bases
      self.aggr = aggr
      self.root_weight = root_weight
  
      dim_root_weight = 1 if root_weight else 0
  
      if num_bases is not None:
          self.weight = Parameter(
              torch.empty(
                  num_bases + dim_root_weight, in_channels, out_channels
              )
          )
          self.comp = Parameter(torch.empty(num_relations, num_bases))
      else:
          self.weight = Parameter(
              torch.empty(
                  num_relations + dim_root_weight,
                  in_channels,
                  out_channels,
              )
          )
          self.register_parameter("comp", None)
  
      if bias:
          self.bias = Parameter(torch.empty(out_channels))
      else:
          self.register_parameter("bias", None)
  
      self.reset_parameters()
  
file_path: pytorch_geometric/torch_geometric/nn/conv/cugraph/rgcn_conv.py
imports: from typing import Optional, Tuple
  import torch
  from torch import Tensor
  from torch.nn import Parameter
  from torch_geometric.nn.conv.cugraph import CuGraphModule
  from torch_geometric.nn.conv.cugraph.base import LEGACY_MODE
  from torch_geometric.nn.inits import glorot, zeros
label_desc: Use image node_id 1 to create a new CuGraphRGCNConv object from inherited base classes: CuGraphModule with example: obj = CuGraphRGCNConv(in_channels, out_channels, num_relations, num_bases, aggr, root_weight, bias)