code: def __init__(self, args):
      super(GIN, self).__init__()
      self.args = args
      self.num_layer = int(self.args["num_layers"])
      assert (
          self.num_layer > 2
      ), "Number of layers in GIN should not less than 3"
  
      missing_keys = list(
          set(
              [
                  "features_num",
                  "num_class",
                  "num_graph_features",
                  "num_layers",
                  "hidden",
                  "dropout",
                  "act",
                  "mlp_layers",
                  "eps",
              ]
          )
          - set(self.args.keys())
      )
      if len(missing_keys) > 0:
          raise Exception("Missing keys: %s." % ",".join(missing_keys))
      if not self.num_layer == len(self.args["hidden"]) + 1:
          LOGGER.warn(
              "Warning: layer size does not match the length of hidden units"
          )
      self.num_graph_features = self.args["num_graph_features"]
  
      if self.args["act"] == "leaky_relu":
          act = LeakyReLU()
      elif self.args["act"] == "relu":
          act = ReLU()
      elif self.args["act"] == "elu":
          act = ELU()
      elif self.args["act"] == "tanh":
          act = Tanh()
      else:
          act = ReLU()
  
      train_eps = True if self.args["eps"] == "True" else False
  
      self.convs = torch.nn.ModuleList()
      self.bns = torch.nn.ModuleList()
  
      nn = [Linear(self.args["features_num"], self.args["hidden"][0])]
      for _ in range(self.args["mlp_layers"] - 1):
          nn.append(act)
          nn.append(
              Linear(self.args["hidden"][0], self.args["hidden"][0])
          )
      # nn.append(BatchNorm1d(self.args['hidden'][0]))
      self.convs.append(GINConv(Sequential(*nn), train_eps=train_eps))
      self.bns.append(BatchNorm1d(self.args["hidden"][0]))
  
      for i in range(self.num_layer - 3):
          nn = [
              Linear(self.args["hidden"][i], self.args["hidden"][i + 1])
          ]
          for _ in range(self.args["mlp_layers"] - 1):
              nn.append(act)
              nn.append(
                  Linear(
                      self.args["hidden"][i + 1],
                      self.args["hidden"][i + 1],
                  )
              )
          # nn.append(BatchNorm1d(self.args['hidden'][i+1]))
          self.convs.append(
              GINConv(Sequential(*nn), train_eps=train_eps)
          )
          self.bns.append(BatchNorm1d(self.args["hidden"][i + 1]))
  
      self.fc1 = Linear(
          self.args["hidden"][self.num_layer - 3]
          + self.num_graph_features,
          self.args["hidden"][self.num_layer - 2],
      )
      self.fc2 = Linear(
          self.args["hidden"][self.num_layer - 2],
          self.args["num_class"],
      )
  
file_path: AutoGL/autogl/module/model/pyg/gin.py
imports: import torch
  import torch.nn.functional
  from torch.nn import Linear, ReLU, Sequential, LeakyReLU, Tanh, ELU
  from torch_geometric.nn import GINConv, global_add_pool
  from torch.nn import BatchNorm1d
  from .None import register_model
  from .base import BaseAutoModel, activate_func
  from copy import deepcopy
  from ....utils import get_logger
label_desc: Use image node_id 1 to create a new GIN object from inherited base classes: torch.nn with example: obj = GIN(args)