class_docstr: An end-to-end deep learning architecture for graph classification.
  paper link: https://muhanzhang.github.io/papers/AAAI_2018_DGCNN.pdf
  
  Attributes:
      num_layers(int): num of gcn layers
      hidden_units(int): num of hidden units
      k(int, optional): The number of nodes to hold for each graph in SortPooling.
      gcn_type(str): type of gcn layer, 'gcn' for GraphConv and 'sage' for SAGEConv
      node_attributes(Tensor, optional): node attribute
      edge_weights(Tensor, optional): edge weight
      node_embedding(Tensor, optional): pre-trained node embedding
      use_embedding(bool, optional): whether to use node embedding. Note that if 'use_embedding' is set True
                           and 'node_embedding' is None, will automatically randomly initialize node embedding.
      num_nodes(int, optional): num of nodes
      dropout(float, optional): dropout rate
      max_z(int, optional): default max vocab size of node labeling, default 1000.
class_docstr_tok: ["An","end-to-end","deep","learning","architecture","for","graph","classification",".","paper","link",":","https",":","\/\/muhanzhang.github.io\/papers\/AAAI_2018_DGCNN.pdf","Attributes",":","num_layers","(","int",")",":","num","of","gcn","layers","hidden_units","(","int",")",":","num","of","hidden","units","k","(","int",",","optional",")",":","The","number","of","nodes","to","hold","for","each","graph","in","SortPooling",".","gcn_type","(","str",")",":","type","of","gcn","layer",",","'gcn","'","for","GraphConv","and","'sage","'","for","SAGEConv","node_attributes","(","Tensor",",","optional",")",":","node","attribute","edge_weights","(","Tensor",",","optional",")",":","edge","weight","node_embedding","(","Tensor",",","optional",")",":","pre-trained","node","embedding","use_embedding","(","bool",",","optional",")",":","whether","to","use","node","embedding",".","Note","that","if","'use_embedding","'","is","set","True","and","'node_embedding","'","is","None",",","will","automatically","randomly","initialize","node","embedding",".","num_nodes","(","int",",","optional",")",":","num","of","nodes","dropout","(","float",",","optional",")",":","dropout","rate","max_z","(","int",",","optional",")",":","default","max","vocab","size","of","node","labeling",",","default","1000","."]
docstr: Args:
      g(DGLGraph): the graph
      z(Tensor): node labeling tensor, shape [N, 1]
      node_id(Tensor, optional): node id tensor, shape [N, 1]
      edge_id(Tensor, optional): edge id tensor, shape [E, 1]
  Returns:
      x(Tensor): output tensor
docstr_tok: ["Args",":","g","(","DGLGraph",")",":","the","graph","z","(","Tensor",")",":","node","labeling","tensor",",","shape","[","N",",","1","]","node_id","(","Tensor",",","optional",")",":","node","id","tensor",",","shape","[","N",",","1","]","edge_id","(","Tensor",",","optional",")",":","edge","id","tensor",",","shape","[","E",",","1","]","Returns",":","x","(","Tensor",")",":","output","tensor"]
code: def forward(self, g, z, node_id=None, edge_id=None):
      """
      Args:
          g(DGLGraph): the graph
          z(Tensor): node labeling tensor, shape [N, 1]
          node_id(Tensor, optional): node id tensor, shape [N, 1]
          edge_id(Tensor, optional): edge id tensor, shape [E, 1]
      Returns:
          x(Tensor): output tensor
      """
      z_emb = self.z_embedding(z)
      if self.use_attribute:
          x = self.node_attributes_lookup(node_id)
          x = torch.cat([z_emb, x], 1)
      else:
          x = z_emb
      if self.use_edge_weight:
          edge_weight = self.edge_weights_lookup(edge_id)
      else:
          edge_weight = None
  
      if self.use_embedding:
          n_emb = self.node_embedding(node_id)
          x = torch.cat([x, n_emb], 1)
  
      xs = [x]
      for layer in self.layers:
          out = torch.tanh(layer(g, xs[-1], edge_weight=edge_weight))
          xs += [out]
  
      x = torch.cat(xs[1:], dim=-1)
  
      # SortPooling
      x = self.pooling(g, x)
      x = x.unsqueeze(1)
      x = F.relu(self.conv_1(x))
      x = self.maxpool1d(x)
      x = F.relu(self.conv_2(x))
      x = x.view(x.size(0), -1)
  
      x = F.relu(self.linear_1(x))
      F.dropout(x, p=self.dropout, training=self.training)
      x = self.linear_2(x)
  
      return x
  
file_path: dgl/examples/pytorch/seal/model.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from dgl.nn.pytorch import GraphConv, SAGEConv, SortPooling, SumPooling
label_desc: Use image node_id 2 for calling the DGCNN obj's underlying member method code with example usage: obj.forward(g, z, node_id, edge_id) and returns: x