Table Of Contents
Table Of Contents

gluonts.block.enc2dec module

class gluonts.block.enc2dec.PassThroughEnc2Dec(**kwargs)[source]

Bases: gluonts.block.enc2dec.Seq2SeqEnc2Dec

Simplest class for passing encoder tensors do decoder. Passes through tensors.

hybrid_forward(F, encoder_output_static: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], encoder_output_dynamic: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], future_features: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]) → Tuple[Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]][source]
Parameters:
  • encoder_output_static – shape (batch_size, num_features) or (N, C)
  • encoder_output_dynamic – shape (batch_size, context_length, num_features) or (N, T, C)
  • future_features – shape (batch_size, prediction_length, num_features) or (N, T, C)
Returns:

  • Tensor – shape (batch_size, num_features) or (N, C)
  • Tensor – shape (batch_size, prediction_length, num_features) or (N, T, C)
  • Tensor – shape (batch_size, sequence_length, num_features) or (N, T, C)

class gluonts.block.enc2dec.Seq2SeqEnc2Dec(**kwargs)[source]

Bases: mxnet.gluon.block.HybridBlock

Abstract class for any module that pass encoder to decoder, such as attention network.

hybrid_forward(F, encoder_output_static: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], encoder_output_dynamic: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], future_features: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]) → Tuple[Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]][source]
Parameters:
  • encoder_output_static – shape (batch_size, num_features) or (N, C)
  • encoder_output_dynamic – shape (batch_size, context_length, num_features) or (N, T, C)
  • future_features – shape (batch_size, prediction_length, num_features) or (N, T, C)
Returns:

  • Tensor – shape (batch_size, num_features) or (N, C)
  • Tensor – shape (batch_size, prediction_length, num_features) or (N, T, C)
  • Tensor – shape (batch_size, sequence_length, num_features) or (N, T, C)