code: def __init__(
      self,
      in_feats,
      out_feats,
      num_heads=1,
      feat_drop=0.0,
      attn_drop=0.0,
      edge_drop=0.0,
      negative_slope=0.2,
      use_attn_dst=True,
      residual=False,
      activation=None,
      allow_zero_in_degree=False,
      use_symmetric_norm=False,
  ):
      super(GATConv, self).__init__()
      self._num_heads = num_heads
      self._in_src_feats, self._in_dst_feats = expand_as_pair(in_feats)
      self._out_feats = out_feats
      self._allow_zero_in_degree = allow_zero_in_degree
      self._use_symmetric_norm = use_symmetric_norm
      if isinstance(in_feats, tuple):
          self.fc_src = nn.Linear(
              self._in_src_feats, out_feats * num_heads, bias=False
          )
          self.fc_dst = nn.Linear(
              self._in_dst_feats, out_feats * num_heads, bias=False
          )
      else:
          self.fc = nn.Linear(
              self._in_src_feats, out_feats * num_heads, bias=False
          )
      self.attn_l = nn.Parameter(
          torch.FloatTensor(size=(1, num_heads, out_feats))
      )
      if use_attn_dst:
          self.attn_r = nn.Parameter(
              torch.FloatTensor(size=(1, num_heads, out_feats))
          )
      else:
          self.register_buffer("attn_r", None)
      self.feat_drop = nn.Dropout(feat_drop)
      self.attn_drop = nn.Dropout(attn_drop)
      self.edge_drop = edge_drop
      self.leaky_relu = nn.LeakyReLU(negative_slope)
      if residual:
          self.res_fc = nn.Linear(
              self._in_dst_feats, num_heads * out_feats, bias=False
          )
      else:
          self.register_buffer("res_fc", None)
      self.reset_parameters()
      self._activation = activation
  
imports: import dgl.nn.pytorch
  import torch
  import torch.nn
  from dgl import function
  from dgl.ops import edge_softmax
  from dgl.utils import expand_as_pair
label_desc: Use image node_id 1 to create a new GATConv object from inherited base classes: nn with example: obj = GATConv(in_feats, out_feats, num_heads, feat_drop, attn_drop, edge_drop, negative_slope, use_attn_dst, residual, activation, allow_zero_in_degree, use_symmetric_norm)