class_docstr: Defines RNN encoder that uses covariates and target as input to the RNN if
  desired.
  
  Parameters
  ----------
  mode
      type of the RNN. Can be either: rnn_relu (RNN with relu activation),
      rnn_tanh, (RNN with tanh activation), lstm or gru.
  hidden_size
      number of units per hidden layer.
  num_layers
      number of hidden layers.
  bidirectional
      toggle use of bi-directional RNN as encoder.
  use_static_feat
      flag to toggle whether to use use_static_feat as input to the encoder
  use_dynamic_feat
      flag to toggle whether to use use_dynamic_feat as input to the encoder
class_docstr_tok: ["Defines","RNN","encoder","that","uses","covariates","and","target","as","input","to","the","RNN","if","desired",".","Parameters","--","--","--","--","--","mode","type","of","the","RNN",".","Can","be","either",":","rnn_relu","(","RNN","with","relu","activation",")",",","rnn_tanh",",","(","RNN","with","tanh","activation",")",",","lstm","or","gru",".","hidden_size","number","of","units","per","hidden","layer",".","num_layers","number","of","hidden","layers",".","bidirectional","toggle","use","of","bi-directional","RNN","as","encoder",".","use_static_feat","flag","to","toggle","whether","to","use","use_static_feat","as","input","to","the","encoder","use_dynamic_feat","flag","to","toggle","whether","to","use","use_dynamic_feat","as","input","to","the","encoder"]
docstr: Parameters
  ----------
  F
      A module that can either refer to the Symbol API or the NDArray
      API in MXNet.
  target
      target time series,
      shape (batch_size, sequence_length, 1)
  static_features
      static features,
      shape (batch_size, num_feat_static)
  dynamic_features
      dynamic_features,
      shape (batch_size, sequence_length, num_feat_dynamic)
  
  Returns
  -------
  Tensor
      static code,
      shape (batch_size, num_feat_static)
  Tensor
      dynamic code,
      shape (batch_size, sequence_length, num_feat_dynamic)
docstr_tok: ["Parameters","--","--","--","--","--","F","A","module","that","can","either","refer","to","the","Symbol","API","or","the","NDArray","API","in","MXNet",".","target","target","time","series",",","shape","(","batch_size",",","sequence_length",",","1",")","static_features","static","features",",","shape","(","batch_size",",","num_feat_static",")","dynamic_features","dynamic_features",",","shape","(","batch_size",",","sequence_length",",","num_feat_dynamic",")","Returns","--","--","--","-","Tensor","static","code",",","shape","(","batch_size",",","num_feat_static",")","Tensor","dynamic","code",",","shape","(","batch_size",",","sequence_length",",","num_feat_dynamic",")"]
code: def hybrid_forward(
      self,
      F,
      target: Tensor,
      static_features: Tensor,
      dynamic_features: Tensor,
  ) -> Tuple[Tensor, Tensor]:
      """
      Parameters
      ----------
      F
          A module that can either refer to the Symbol API or the NDArray
          API in MXNet.
      target
          target time series,
          shape (batch_size, sequence_length, 1)
      static_features
          static features,
          shape (batch_size, num_feat_static)
      dynamic_features
          dynamic_features,
          shape (batch_size, sequence_length, num_feat_dynamic)
  
      Returns
      -------
      Tensor
          static code,
          shape (batch_size, num_feat_static)
      Tensor
          dynamic code,
          shape (batch_size, sequence_length, num_feat_dynamic)
      """
      if self.use_dynamic_feat and self.use_static_feat:
          inputs = self._assemble_inputs(
              F,
              target=target,
              static_features=static_features,
              dynamic_features=dynamic_features,
          )
      elif self.use_dynamic_feat:
          inputs = F.concat(
              target, dynamic_features, dim=2
          )  # (N, T, C)
      else:
          inputs = target
  
      dynamic_code = self.rnn(inputs)
      static_code = F.slice_axis(
          dynamic_code, axis=1, begin=-1, end=None
      )
      return static_code, dynamic_code
  
imports: from typing import List, Tuple
  from mxnet.gluon import nn
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from gluonts.mx.block.cnn import CausalConv1D
  from gluonts.mx.block.mlp import MLP
  from gluonts.mx.block.rnn import RNN
label_desc: Use image node_id 2 for calling the RNNEncoder obj's underlying member method code with example usage: obj.hybrid_forward(F, target, static_features, dynamic_features) and returns: static_code,  dynamic_code