class_docstr: A simple MLP that can either be used independently or put on top
  of pretrained models (such as BERT) and act as a classifier.
  Args:
      hidden_size (int): the size of each layer
      num_classes (int): number of output classes
      num_layers (int): number of layers
      activation (str): type of activations for layers in between
      log_softmax (bool): whether to add a log_softmax layer before output
class_docstr_tok: ["A","simple","MLP","that","can","either","be","used","independently","or","put","on","top","of","pretrained","models","(","such","as","BERT",")","and","act","as","a","classifier",".","Args",":","hidden_size","(","int",")",":","the","size","of","each","layer","num_classes","(","int",")",":","number","of","output","classes","num_layers","(","int",")",":","number","of","layers","activation","(","str",")",":","type","of","activations","for","layers","in","between","log_softmax","(","bool",")",":","whether","to","add","a","log_softmax","layer","before","output"]
code: def __init__(
      self,
      hidden_size: int,
      num_classes: int,
      num_layers: int = 2,
      activation: str = "relu",
      log_softmax: bool = True,
  ):
      super().__init__()
      self.layers = 0
      for _ in range(num_layers - 1):
          layer = torch.nn.Linear(hidden_size, hidden_size)
          setattr(self, f"layer{self.layers}", layer)
          setattr(
              self,
              f"layer{self.layers + 1}",
              getattr(torch, activation),
          )
          self.layers += 2
      layer = torch.nn.Linear(hidden_size, num_classes)
      setattr(self, f"layer{self.layers}", layer)
      self.layers += 1
      self.log_softmax = log_softmax
  
imports: import torch
label_desc: Use image node_id 1 to create a new MultiLayerPerceptron object from inherited base classes: torch.nn with example: obj = MultiLayerPerceptron(hidden_size, num_classes, num_layers, activation, log_softmax)