class_docstr: Defines an MLP block.
  
  Parameters
  ----------
  layer_sizes
      number of hidden units per layer.
  
  flatten
      toggle whether to flatten the output tensor.
  
  activation
      activation function of the MLP, default is relu.
code: def __init__(
      self, layer_sizes: List[int], flatten: bool, activation="relu"
  ) -> None:
      super().__init__()
      self.layer_sizes = layer_sizes
      with self.name_scope():
          self.layers = nn.HybridSequential()
          for layer, layer_dim in enumerate(layer_sizes):
              self.layers.add(
                  nn.Dense(
                      layer_dim, flatten=flatten, activation=activation
                  )
              )
  
imports: from typing import List
  from mxnet.gluon import nn
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
label_desc: Use image node_id 1 to create a new MLP object from inherited base classes: nn with example: obj = MLP(layer_sizes, flatten, activation)