gluonts.mx.block.snmlp module#
- class gluonts.mx.block.snmlp.SNMLPBlock(in_units: int, hidden_units: int, out_units: int, num_hidden_layers: int = 2, activation: str = 'lipswish', jacobian_method: str = 'bf', num_power_iter: int = 1, coeff: float = 0.9, flatten: bool = False)[source]#
Bases:
mxnet.gluon.block.HybridBlock
- gluonts.mx.block.snmlp.jacobian_sn_mlp_block_bf(layers: List[Tuple[mxnet.gluon.block.HybridBlock, Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]]]) Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol] [source]#
Brute force computation of the jacobian of a SNMlpBlock jac is of shape (Batch dim1, …, Output dim, Input dim)
- Parameters
layers – A list of tuples where each tuple (layer, input) is associated to a composing layer of the SNMLPBlock, where layer corresponds to the associated object layer, along with its input tensor.
- Returns
Jacobian of the SNMLPBlock computed at a given input
- Return type
Tensor