class_docstr: Implement of GAT
      
class_docstr_tok: ["Implement","of","GAT"]
code: def __init__(
      self,
      input_size,
      num_class,
      num_layers=1,
      feat_drop=0.6,
      attn_drop=0.6,
      num_heads=8,
      hidden_size=8,
      drop=0.1,
      edge_type=5,
      **kwargs,
  ):
      super(GNNModel, self).__init__()
      self.num_class = num_class
      self.num_layers = num_layers
      self.feat_drop = feat_drop
      self.attn_drop = attn_drop
      self.num_heads = num_heads
      self.hidden_size = hidden_size
      self.drop = drop
      self.edge_type = edge_type
  
      self.gats = nn.LayerList()
      self.skips = nn.LayerList()
      self.norms = nn.LayerList()
  
      fc_w_attr = paddle.ParamAttr(
          initializer=nn.initializer.Constant(1.0)
      )
      fc_bias_attr = paddle.ParamAttr(
          initializer=nn.initializer.Constant(0.0)
      )
  
      for i in range(self.num_layers):
          self.norms.append(
              nn.BatchNorm1D(
                  self.hidden_size,
                  momentum=0.9,
                  weight_attr=fc_w_attr,
                  bias_attr=fc_bias_attr,
                  data_format="NC",
              )
          )
          if i == 0:
              self.skips.append(
                  linear_init(
                      input_size, self.hidden_size, init_type="linear"
                  )
              )
              self.gats.append(
                  nn.LayerList(
                      [
                          GATConv(
                              input_size,
                              self.hidden_size // self.num_heads,
                              self.feat_drop,
                              self.attn_drop,
                              self.num_heads,
                              activation=None,
                          )
                          for _ in range(edge_type)
                      ]
                  )
              )
          else:
              self.skips.append(
                  linear_init(
                      self.hidden_size,
                      self.hidden_size,
                      init_type="linear",
                  )
              )
              self.gats.append(
                  nn.LayerList(
                      [
                          GATConv(
                              self.hidden_size,
                              self.hidden_size // self.num_heads,
                              self.feat_drop,
                              self.attn_drop,
                              self.num_heads,
                              activation=None,
                          )
                          for _ in range(edge_type)
                      ]
                  )
              )
  
      self.mlp = nn.Sequential(
          linear_init(
              self.hidden_size, self.hidden_size, init_type="linear"
          ),
          nn.BatchNorm1D(
              self.hidden_size,
              momentum=0.9,
              weight_attr=fc_w_attr,
              bias_attr=fc_bias_attr,
              data_format="NC",
          ),
          nn.ReLU(),
          nn.Dropout(p=self.drop),
          linear_init(
              self.hidden_size, self.num_class, init_type="linear"
          ),
      )
  
      self.dropout = nn.Dropout(p=self.drop)
  
file_path: PGL/ogb_examples/lsc/MAG240M/models/rgat.py
imports: import pgl
  import paddle
  import paddle.nn
  import paddle.nn.functional
  import numpy
  import paddle.fluid.layers
  from pgl.utils.logger import log
  from .gat_conv import linear_init, GATConv
label_desc: Use image node_id 1 to create a new GNNModel object from inherited base classes: nn with example: obj = GNNModel(input_size, num_class, num_layers, feat_drop, attn_drop, num_heads, hidden_size, drop, edge_type)