class_docstr: FeedForwardNNLayer class for graph classification task.
  
  Parameters
  ----------
  input_size : int
      The dimension of input graph embeddings.
  num_class : int
      The number of classes for classification.
  hidden_size : list of int
      Hidden size per NN layer.
  activation: nn.Module, optional
      The activation function, default: `nn.ReLU()`.
class_docstr_tok: ["FeedForwardNNLayer","class","for","graph","classification","task",".","Parameters","--","--","--","--","--","input_size",":","int","The","dimension","of","input","graph","embeddings",".","num_class",":","int","The","number","of","classes","for","classification",".","hidden_size",":","list","of","int","Hidden","size","per","NN","layer",".","activation",":","nn.Module",",","optional","The","activation","function",",","default",":","`","nn.ReLU","(",")","`","."]
code: def __init__(
      self, input_size, num_class, hidden_size, activation=None
  ):
      super(FeedForwardNNLayer, self).__init__()
  
      if not activation:
          activation = nn.ReLU()
  
      # build the linear module list
      module_seq = []
  
      for layer_idx in range(len(hidden_size)):
          if layer_idx == 0:
              module_seq.append(
                  (
                      "fc" + str(layer_idx),
                      nn.Linear(input_size, hidden_size[layer_idx]),
                  )
              )
          else:
              module_seq.append(
                  (
                      "fc" + str(layer_idx),
                      nn.Linear(
                          hidden_size[layer_idx - 1],
                          self.hidden_size[layer_idx],
                      ),
                  )
              )
  
          module_seq.append(("activate" + str(layer_idx), activation))
  
      module_seq.append(
          ("fc_end", nn.Linear(hidden_size[-1], num_class))
      )
  
      self.classifier = nn.Sequential(
          collections.OrderedDict(module_seq)
      )
  
file_path: graph4nlp/graph4nlp/pytorch/modules/prediction/classification/graph_classification/feedforward_nn.py
imports: import collections
  from torch import nn
  from ..base import GraphClassifierBase, GraphClassifierLayerBase
  from .avg_pooling import AvgPooling
  from .max_pooling import MaxPooling
label_desc: Use image node_id 1 to create a new FeedForwardNNLayer object from inherited base classes: GraphClassifierLayerBase with example: obj = FeedForwardNNLayer(input_size, num_class, hidden_size, activation)