docstr: :num_layars: the number of layers in each R-GCN
docstr_tok: [":","num_layars",":","the","number","of","layers","in","each","R-GCN"]
code: def __init__(
      self,
      nfeat,
      nhid=128,
      nout=128,
      edge_dim=3,
      num_layers=3,
      dropout=0.0,
      normalization=False,
  ):
      """
      :num_layars: the number of layers in each R-GCN
      """
      super(RGCN, self).__init__()
  
      self.nfeat = nfeat
      self.nhid = nhid
      self.nout = nout
      self.edge_dim = edge_dim
      self.num_layers = num_layers
  
      self.dropout = dropout
      self.normalization = normalization
  
      self.emb = nn.Linear(nfeat, nfeat, bias=False)
  
      self.gc1 = RelationGraphConvolution(
          nfeat,
          nhid,
          edge_dim=self.edge_dim,
          aggregate="sum",
          use_relu=True,
          dropout=self.dropout,
          bias=False,
      )
  
      self.gc2 = nn.ModuleList(
          [
              RelationGraphConvolution(
                  nhid,
                  nhid,
                  edge_dim=self.edge_dim,
                  aggregate="sum",
                  use_relu=True,
                  dropout=self.dropout,
                  bias=False,
              )
              for i in range(self.num_layers - 2)
          ]
      )
  
      self.gc3 = RelationGraphConvolution(
          nhid,
          nout,
          edge_dim=self.edge_dim,
          aggregate="sum",
          use_relu=False,
          dropout=self.dropout,
          bias=False,
      )
  
file_path: DIG/dig/ggraph/method/GraphAF/model/rgcn.py
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new RGCN object from inherited base classes: nn with example: obj = RGCN(nfeat, nhid, nout, edge_dim, num_layers, dropout, normalization)