class_docstr: Relational graph convolution layer.
  
  Parameters
  ----------
  in_feat : int
      Input feature size.
  out_feat : int
      Output feature size.
  rel_names : list[str]
      Relation names.
  num_bases : int, optional
      Number of bases. If is none, use number of relations. Default: None.
  weight : bool, optional
      True if a linear layer is applied after message passing. Default: True
  bias : bool, optional
      True if bias is added. Default: True
  activation : callable, optional
      Activation function. Default: None
  self_loop : bool, optional
      True to include self loop message. Default: False
  dropout : float, optional
      Dropout rate. Default: 0.0
class_docstr_tok: ["Relational","graph","convolution","layer",".","Parameters","--","--","--","--","--","in_feat",":","int","Input","feature","size",".","out_feat",":","int","Output","feature","size",".","rel_names",":","list","[","str","]","Relation","names",".","num_bases",":","int",",","optional","Number","of","bases",".","If","is","none",",","use","number","of","relations",".","Default",":","None",".","weight",":","bool",",","optional","True","if","a","linear","layer","is","applied","after","message","passing",".","Default",":","True","bias",":","bool",",","optional","True","if","bias","is","added",".","Default",":","True","activation",":","callable",",","optional","Activation","function",".","Default",":","None","self_loop",":","bool",",","optional","True","to","include","self","loop","message",".","Default",":","False","dropout",":","float",",","optional","Dropout","rate",".","Default",":","0.0"]
code: def __init__(
      self,
      in_feat,
      out_feat,
      rel_names,
      num_bases,
      *,
      weight=True,
      bias=True,
      activation=None,
      self_loop=False,
      dropout=0.0,
  ):
      super(RelGraphConvLayerHeteroAPI, self).__init__()
      self.in_feat = in_feat
      self.out_feat = out_feat
      self.rel_names = rel_names
      self.num_bases = num_bases
      self.bias = bias
      self.activation = activation
      self.self_loop = self_loop
  
      self.use_weight = weight
      self.use_basis = num_bases < len(self.rel_names) and weight
      if self.use_weight:
          if self.use_basis:
              self.basis = dglnn.WeightBasis(
                  (in_feat, out_feat), num_bases, len(self.rel_names)
              )
          else:
              self.weight = nn.Parameter(
                  th.Tensor(len(self.rel_names), in_feat, out_feat)
              )
              nn.init.xavier_uniform_(
                  self.weight, gain=nn.init.calculate_gain("relu")
              )
  
      # bias
      if bias:
          self.h_bias = nn.Parameter(th.Tensor(out_feat))
          nn.init.zeros_(self.h_bias)
  
      # weight for self loop
      if self.self_loop:
          self.loop_weight = nn.Parameter(th.Tensor(in_feat, out_feat))
          nn.init.xavier_uniform_(
              self.loop_weight, gain=nn.init.calculate_gain("relu")
          )
  
      self.dropout = nn.Dropout(dropout)
  
imports: from collections import defaultdict
  import dgl
  import dgl.function
  import dgl.nn
  import torch
  import torch.nn
  import torch.nn.functional
  import tqdm
label_desc: Use image node_id 1 to create a new RelGraphConvLayerHeteroAPI object from inherited base classes: nn with example: obj = RelGraphConvLayerHeteroAPI(in_feat, out_feat, rel_names, num_bases)