class_docstr: Gated Graph Attention module, it is a general purpose
  graph attention module proposed in paper GaAN. The paper use
  it for traffic prediction task
  Parameter
  ==========
  in_feats : int
      number of input feature
  
  out_feats : int
      number of output feature
  
  map_feats : int
      intermediate feature size for gate computation
  
  num_heads : int
      number of head for multihead attention
class_docstr_tok: ["Gated","Graph","Attention","module",",","it","is","a","general","purpose","graph","attention","module","proposed","in","paper","GaAN",".","The","paper","use","it","for","traffic","prediction","task","Parameter","==========","in_feats",":","int","number","of","input","feature","out_feats",":","int","number","of","output","feature","map_feats",":","int","intermediate","feature","size","for","gate","computation","num_heads",":","int","number","of","head","for","multihead","attention"]
code: def forward(self, g, x):
      with g.local_scope():
          g.ndata["x"] = x
          g.ndata["z"] = self.gate_m(x)
          g.update_all(fn.copy_u("x", "x"), fn.mean("x", "mean_z"))
          g.update_all(fn.copy_u("z", "z"), fn.max("z", "max_z"))
          nft = torch.cat(
              [g.ndata["x"], g.ndata["max_z"], g.ndata["mean_z"]], dim=1
          )
          gate = self.gate_fn(nft).sigmoid()
          attn_out = self.gatlayer(g, x)
          node_num = g.num_nodes()
          gated_out = (
              (gate.view(-1) * attn_out.view(-1, self.out_feats).T).T
          ).view(node_num, self.num_heads, self.out_feats)
          gated_out = gated_out.mean(1)
          merge = self.merger_layer(torch.cat([x, gated_out], dim=1))
          return merge
  
file_path: dgl/examples/pytorch/dtgrnn/gaan.py
imports: import dgl
  import dgl.function
  import dgl.nn
  import numpy
  import torch
  import torch.nn
  from dgl.base import DGLError
  from dgl.nn.functional import edge_softmax
label_desc: Use image node_id 2 for calling the GatedGAT obj's underlying member method code with example usage: obj.forward(g, x) and returns: merge