class_docstr: Implementation of GIN model + Global Pool(mean, GMT, GlobalAttention, Set2Set).
      
class_docstr_tok: ["Implementation","of","GIN","model","+","Global","Pool","(","mean",",","GMT",",","GlobalAttention",",","Set2Set",")","."]
docstr: Forward
docstr_tok: ["Forward"]
code: def forward(self, graph):
      """
      Forward
      """
      features_list = [graph.node_feat["attr"]]
      for i in range(self.num_layers):
          h = self.gin_convs[i](graph, features_list[i])
          h = self.norms[i](h)
          if self.use_residual and i > 0:
              h = h + features_list[-1]
          h = F.dropout(
              self.relu(h), p=self.dropout_prob, training=self.training
          )
          features_list.append(h)
      # Jump Knowledge
      if self.jk == "sum":
          h = 0
          for i in features_list[1:]:
              h += i
      elif self.jk == "last":
          h = features_list[-1]
      output = self.graph_pooling(graph, h)
      return self.out_layer(output)
  
file_path: PGL/examples/global_pool/global_pool.py
imports: import os
  import sys
  import time
  import argparse
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  import pgl
  from pgl.nn import GlobalAttention, Set2Set, GraphMultisetTransformer
label_desc: Use image node_id 2 for calling the GINModel obj's underlying member method code with example usage: obj.forward(graph) and returns: self