class_docstr: Defines a multilayer perceptron used as an encoder.
  
  Parameters
  ----------
  layer_sizes
      number of hidden units per layer.
  kwargs
class_docstr_tok: ["Defines","a","multilayer","perceptron","used","as","an","encoder",".","Parameters","--","--","--","--","--","layer_sizes","number","of","hidden","units","per","layer",".","kwargs"]
code: def __init__(self, layer_sizes: List[int], **kwargs) -> None:
      super().__init__(**kwargs)
      self.model = MLP(layer_sizes, flatten=True)
  
imports: from typing import List, Tuple
  from mxnet.gluon import nn
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from gluonts.mx.block.cnn import CausalConv1D
  from gluonts.mx.block.mlp import MLP
  from gluonts.mx.block.rnn import RNN
label_desc: Use image node_id 1 to create a new MLPEncoder object from inherited base classes: Seq2SeqEncoder with example: obj = MLPEncoder(layer_sizes)