class_docstr: An accelerated relational graph convolution layer from `Modeling
  Relational Data with Graph Convolutional Networks
  <https://arxiv.org/abs/1703.06103>`__, with the sparse aggregation
  accelerated by cugraph-ops.
  
  Parameters
  ----------
  in_feats : int
      Input feature size.
  out_feats : int
      Output feature size.
  num_rels : int
      Number of relations.
  regularizer : str, optional
      Which weight regularizer to use ("basis" or ``None``):
       - "basis" is for basis-decomposition.
       - ``None`` applies no regularization.
      Default: ``None``.
  num_bases : int, optional
      Number of bases. It comes into effect when a regularizer is applied.
      Default: ``None``.
  bias : bool, optional
      True if bias is added. Default: ``True``.
  self_loop : bool, optional
      True to include self loop message. Default: ``True``.
  dropout : float, optional
      Dropout rate. Default: ``0.0``.
  apply_norm : bool, optional
      True to normalize aggregation output by the in-degree of the destination
      node per edge type, i.e. :math:`|\mathcal{N}^r_i|`. Default: ``True``.
  
  Examples
  --------
  >>> import dgl
  >>> import torch
  >>> from cugraph_dgl.nn import RelGraphConv
  ...
  >>> device = 'cuda'
  >>> g = dgl.graph(([0,1,2,3,2,5], [1,2,3,4,0,3])).to(device)
  >>> feat = torch.ones(6, 10).to(device)
  >>> conv = RelGraphConv(
  ...     10, 2, 3, regularizer='basis', num_bases=2).to(device)
  >>> etypes = torch.tensor([0,1,2,0,1,2]).to(device)
  >>> res = conv(g, feat, etypes)
  >>> res
  tensor([[-1.7774, -2.0184],
          [-1.4335, -2.3758],
          [-1.7774, -2.0184],
          [-0.4698, -3.0876],
          [-1.4335, -2.3758],
          [-1.4331, -2.3295]], device='cuda:0', grad_fn=<AddBackward0>)
code: def __init__(
      self,
      in_feats: int,
      out_feats: int,
      num_rels: int,
      regularizer: Optional[str] = None,
      num_bases: Optional[int] = None,
      bias: bool = True,
      self_loop: bool = True,
      dropout: float = 0.0,
      apply_norm: bool = False,
  ):
      super().__init__()
      self.in_feats = in_feats
      self.out_feats = out_feats
      self.num_rels = num_rels
      self.apply_norm = apply_norm
      self.dropout = nn.Dropout(dropout)
  
      dim_self_loop = 1 if self_loop else 0
      self.self_loop = self_loop
      if regularizer is None:
          self.W = nn.Parameter(
              torch.Tensor(
                  num_rels + dim_self_loop, in_feats, out_feats
              )
          )
          self.coeff = None
      elif regularizer == "basis":
          if num_bases is None:
              raise ValueError(
                  'Missing "num_bases" for basis regularization.'
              )
          self.W = nn.Parameter(
              torch.Tensor(
                  num_bases + dim_self_loop, in_feats, out_feats
              )
          )
          self.coeff = nn.Parameter(torch.Tensor(num_rels, num_bases))
          self.num_bases = num_bases
      else:
          raise ValueError(
              f"Supported regularizer options: 'basis' or None, but got "
              f"'{regularizer}'."
          )
      self.regularizer = regularizer
  
      if bias:
          self.bias = nn.Parameter(torch.Tensor(out_feats))
      else:
          self.register_parameter("bias", None)
  
      self.reset_parameters()
  
file_path: cugraph/python/cugraph-dgl/cugraph_dgl/nn/conv/relgraphconv.py
imports: import math
  from typing import Optional, Union
  from cugraph_dgl.nn.conv.base import BaseConv, SparseGraph
  from cugraph.utilities.utils import import_optional
label_desc: Use image node_id 1 to create a new RelGraphConv object from inherited base classes: BaseConv with example: obj = RelGraphConv(in_feats, out_feats, num_rels, regularizer, num_bases, bias, _loop, dropout, apply_norm)