class_docstr: The Self-Attention Graph Pooling Network with hierarchical readout in paper
  `Self Attention Graph Pooling <https://arxiv.org/pdf/1904.08082.pdf>`
  
  Args:
      in_dim (int): The input node feature dimension.
      hid_dim (int): The hidden dimension for node feature.
      out_dim (int): The output dimension.
      num_convs (int, optional): The number of graph convolution layers.
          (default: 3)
      pool_ratio (float, optional): The pool ratio which determines the amount of nodes
          remain after pooling. (default: :obj:`0.5`)
      dropout (float, optional): The dropout ratio for each layer. (default: 0)
class_docstr_tok: ["The","Self-Attention","Graph","Pooling","Network","with","hierarchical","readout","in","paper","`","Self","Attention","Graph","Pooling","<","https",":","\/\/arxiv.org\/pdf\/1904.08082.pdf",">","`","Args",":","in_dim","(","int",")",":","The","input","node","feature","dimension",".","hid_dim","(","int",")",":","The","hidden","dimension","for","node","feature",".","out_dim","(","int",")",":","The","output","dimension",".","num_convs","(","int",",","optional",")",":","The","number","of","graph","convolution","layers",".","(","default",":","3",")","pool_ratio","(","float",",","optional",")",":","The","pool","ratio","which","determines","the","amount","of","nodes","remain","after","pooling",".","(","default",":",":","obj",":","`","0.5","`",")","dropout","(","float",",","optional",")",":","The","dropout","ratio","for","each","layer",".","(","default",":","0",")"]
code: def forward(self, graph: dgl.DGLGraph):
      feat = graph.ndata["feat"]
      final_readout = None
  
      for i in range(self.num_convpools):
          graph, feat, readout = self.convpools[i](graph, feat)
          if final_readout is None:
              final_readout = readout
          else:
              final_readout = final_readout + readout
  
      feat = F.relu(self.lin1(final_readout))
      feat = F.dropout(feat, p=self.dropout, training=self.training)
      feat = F.relu(self.lin2(feat))
      feat = F.log_softmax(self.lin3(feat), dim=-1)
  
      return feat
  
file_path: dgl/examples/pytorch/sagpool/network.py
imports: import dgl
  import torch
  import torch.nn
  import torch.nn.functional
  from dgl.nn import AvgPooling, GraphConv, MaxPooling
  from layer import ConvPoolBlock, SAGPool
label_desc: Use image node_id 2 for calling the SAGNetworkHierarchical obj's underlying member method code with example usage: obj.forward(graph) and returns: feat