class_docstr: Multi-Layer Perceptron
code: def __init__(
      self,
      in_size,
      out_size,
      hidden_sizes,
      nonlinearity=F.relu,
      last_wscale=1,
  ):
      self.in_size = in_size
      self.out_size = out_size
      self.hidden_sizes = hidden_sizes
      self.nonlinearity = nonlinearity
  
      super().__init__()
      with self.init_scope():
          if hidden_sizes:
              hidden_layers = []
              hidden_layers.append(L.Linear(in_size, hidden_sizes[0]))
              for hin, hout in zip(hidden_sizes, hidden_sizes[1:]):
                  hidden_layers.append(L.Linear(hin, hout))
              self.hidden_layers = chainer.ChainList(*hidden_layers)
              self.output = L.Linear(
                  hidden_sizes[-1],
                  out_size,
                  initialW=LeCunNormal(last_wscale),
              )
          else:
              self.output = L.Linear(
                  in_size, out_size, initialW=LeCunNormal(last_wscale)
              )
  
file_path: chainerrl/chainerrl/links/mlp.py
imports: import chainer
  from chainer import functions
  from chainer.initializers import LeCunNormal
  from chainer import links
label_desc: Use image node_id 1 to create a new MLP object from inherited base classes: chainer with example: obj = MLP(in_size, out_size, hidden_sizes, nonlinearity, last_wscale)