class_docstr: Implementation of Graph Global Pooling "Set2Set".
  
  Reference Paper: ORDER MATTERS: SEQUENCE TO SEQUENCE 
  
  Args:
      input_dim (int): dimentional size of input
      n_iters: number of iteration
      n_layers: number of LSTM layers
  Return:
      output_feat: output feature of set2set pooling with shape [batch, 2*dim].
class_docstr_tok: ["Implementation","of","Graph","Global","Pooling","``","Set2Set","''",".","Reference","Paper",":","ORDER","MATTERS",":","SEQUENCE","TO","SEQUENCE","Args",":","input_dim","(","int",")",":","dimentional","size","of","input","n_iters",":","number","of","iteration","n_layers",":","number","of","LSTM","layers","Return",":","output_feat",":","output","feature","of","set2set","pooling","with","shape","[","batch",",","2","*","dim","]","."]
code: def __init__(self, input_dim, n_iters, n_layers=1):
      super(Set2Set, self).__init__()
      self.input_dim = input_dim
      self.output_dim = 2 * input_dim
      self.n_iters = n_iters
      self.n_layers = n_layers
      self.lstm = paddle.nn.LSTM(
          input_size=self.output_dim,
          hidden_size=self.input_dim,
          num_layers=n_layers,
          time_major=True,
      )
  
imports: import warnings
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  import pgl
  from pgl.math import segment_sum, segment_softmax, segment_topk, segment_pool
  from pgl.utils.transform import filter_adj
label_desc: Use image node_id 1 to create a new Set2Set object from inherited base classes: nn with example: obj = Set2Set(input_dim, n_iters, n_layers)