gluonts.mx.representation.dim_expansion module#
- class gluonts.mx.representation.dim_expansion.DimExpansion(axis: int = -1, *args, **kwargs)[source]#
Bases:
Representation
A class representing a dimension expansion operation along a specified axis.
- Parameters:
axis – Axis on which to expand the tensor. (default: -1)
- hybrid_forward(F, data: Union[NDArray, Symbol], observed_indicator: Union[NDArray, Symbol], scale: Optional[Union[NDArray, Symbol]], rep_params: List[Union[NDArray, Symbol]], **kwargs) Tuple[Union[NDArray, Symbol], Union[NDArray, Symbol], List[Union[NDArray, Symbol]]] [source]#
Transform the data into the desired representation.
- Parameters:
F –
data – Target data.
observed_indicator – Target observed indicator.
scale – Pre-computed scale.
rep_params – Additional pre-computed representation parameters.
**kwargs – Additional block-specfic parameters.
:param : Additional block-specfic parameters.
- Returns:
Tuple consisting of the transformed data, the computed scale, and additional parameters to be passed to post_transform.
- Return type:
Tuple[Tensor, Tensor, List[Tensor]]