code: def __init__(
      self,
      in_size,
      out_sizes,
      non_linear_layer,
      output_non_linearity=False,
  ):
      super().__init__()
      assert len(out_sizes) >= 1
      layers = []
      in_sizes = [in_size] + out_sizes[0:-1]
      sizes = list(zip(in_sizes, out_sizes))
      for i, o in sizes[0:-1]:
          layers.append(nn.Linear(i, o))
          layers.append(non_linear_layer())
      layers.append(nn.Linear(sizes[-1][0], sizes[-1][1]))
      if output_non_linearity:
          layers.append(non_linear_layer())
      self.seq = nn.Sequential(*layers)
  
imports: import torch
  import torch.nn
  from torch.nn.functional import softplus
label_desc: Use image node_id 1 to create a new MLP object from inherited base classes: nn with example: obj = MLP(in_size, out_sizes, non_linear_layer, output_non_linearity)