docstr:  
  Args:
  
      graph: `pgl.Graph` instance.
  
      feature: A tensor with shape (num_nodes, input_size)
  
  
  Return:
  
      If `concat=True` then return a tensor with shape (num_nodes, output_size),
      else return a tensor with shape (num_nodes, output_size * num_heads) 
docstr_tok: ["Args",":","graph",":","`","pgl.Graph","`","instance",".","feature",":","A","tensor","with","shape","(","num_nodes",",","input_size",")","Return",":","If","`","concat=True","`","then","return","a","tensor","with","shape","(","num_nodes",",","output_size",")",",","else","return","a","tensor","with","shape","(","num_nodes",",","output_size","*","num_heads",")"]
code: def forward(self, graph, feature):
      """
  
      Args:
  
          graph: `pgl.Graph` instance.
  
          feature: A tensor with shape (num_nodes, input_size)
  
  
      Return:
  
          If `concat=True` then return a tensor with shape (num_nodes, output_size),
          else return a tensor with shape (num_nodes, output_size * num_heads)
  
      """
  
      if self.feat_drop > 1e-15:
          feature = self.feat_dropout(feature)
  
      feature = self.linear(feature)
      feature = paddle.reshape(
          feature, [-1, self.num_heads, self.output_size]
      )
  
      attn_src = paddle.sum(feature * self.weight_src, axis=-1)
      attn_dst = paddle.sum(feature * self.weight_dst, axis=-1)
      msg = graph.send(
          self._send_attention,
          src_feat={"src": attn_src, "h": feature},
          dst_feat={"dst": attn_dst},
      )
      output = graph.recv(reduce_func=self._reduce_attention, msg=msg)
  
      if self.activation is not None:
          output = self.activation(output)
      return output
  
imports: import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  import pgl
  from pgl.nn import functional
label_desc: Use image node_id 4 for calling the GATConv obj's underlying member method code with example usage: obj.forward(graph, feature) and returns: output