Table Of Contents
Table Of Contents

gluonts.block.mlp module

class gluonts.block.mlp.MLP(layer_sizes: List[int], flatten: bool, activation='relu')[source]

Bases: mxnet.gluon.block.HybridBlock

Defines an MLP block.

  • 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.
hybrid_forward(F, x: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]) → Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol][source]
  • F – A module that can either refer to the Symbol API or the NDArray API in MXNet.
  • x – Input tensor

Output of the MLP given the input tensor.

Return type: