gluonts.mx.block.enc2dec module

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

Bases: gluonts.mx.block.enc2dec.Seq2SeqEnc2Dec

Integrates the encoder_ouput_dynamic and future_features_dynamic into one and passes them through as the dynamic input to the decoder.

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_dynamic: 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]][source]
Parameters
  • encoder_output_static – shape (batch_size, num_features) or (N, C)

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

  • future_features_dynamic – shape (batch_size, sequence_length, prediction_length, num_features) or (N, T, P, C`)

Returns

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

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

  • Tensor – shape (1,)

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

Bases: gluonts.mx.block.enc2dec.Seq2SeqEnc2Dec

Simplest class for passing encoder tensors do decoder. Passes through tensors, except that future_features_dynamic is dropped.

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_dynamic: 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]][source]
Parameters
  • encoder_output_static – shape (batch_size, num_features) or (N, C)

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

  • future_features_dynamic – shape (batch_size, sequence_length, prediction_length, num_features) or (N, T, P, C`)

Returns

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

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

class gluonts.mx.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_dynamic: 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, sequence_length, num_features) or (N, T, C)

  • future_features_dynamic – shape (batch_size, sequence_length, prediction_length, num_features) or (N, T, P, C`)

Returns

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

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