gluonts.mx.block.mlp module#
- class gluonts.mx.block.mlp.MLP(layer_sizes: List[int], flatten: bool, activation='relu')[source]#
Bases:
mxnet.gluon.block.HybridBlock
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.
- hybrid_forward(F, x: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]) Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol] [source]#
- Parameters
F – A module that can either refer to the Symbol API or the NDArray API in MXNet.
x – Input tensor
- Returns
Output of the MLP given the input tensor.
- Return type
Tensor