class_docstr: Defines a stack of dilated convolutions as the encoder.
  
  See the following paper for details:
  1. Van Den Oord, A., Dieleman, S., Zen, H., Simonyan, K., Vinyals, O.,
  Graves, A., Kalchbrenner, N., Senior, A.W. and Kavukcuoglu, K., 2016,
  September. WaveNet: A generative model for raw audio. In SSW (p. 125).
  
  Parameters
  ----------
  dilation_seq
      dilation for each convolution in the stack.
  kernel_size_seq
      kernel size for each convolution in the stack.
  channels_seq
      number of channels for each convolution in the stack.
  use_residual
      flag to toggle using residual connections.
  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","a","stack","of","dilated","convolutions","as","the","encoder",".","See","the","following","paper","for","details",":","1",".","Van","Den","Oord",",","A.",",","Dieleman",",","S.",",","Zen",",","H.",",","Simonyan",",","K.",",","Vinyals",",","O.",",","Graves",",","A.",",","Kalchbrenner",",","N.",",","Senior",",","A.W",".","and","Kavukcuoglu",",","K.",",","2016",",","September",".","WaveNet",":","A","generative","model","for","raw","audio",".","In","SSW","(","p.","125",")",".","Parameters","--","--","--","--","--","dilation_seq","dilation","for","each","convolution","in","the","stack",".","kernel_size_seq","kernel","size","for","each","convolution","in","the","stack",".","channels_seq","number","of","channels","for","each","convolution","in","the","stack",".","use_residual","flag","to","toggle","using","residual","connections",".","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, channel_seqs + (1) if use_residual)
  Tensor
      dynamic code,
      shape (batch_size, sequence_length, channel_seqs + (1) if
      use_residual)
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",",","channel_seqs","+","(","1",")","if","use_residual",")","Tensor","dynamic","code",",","shape","(","batch_size",",","sequence_length",",","channel_seqs","+","(","1",")","if","use_residual",")"]
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, channel_seqs + (1) if use_residual)
      Tensor
          dynamic code,
          shape (batch_size, sequence_length, channel_seqs + (1) if
          use_residual)
      """
  
      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:
          # For now, static features only used when dynamic feat enabled
          inputs = target
  
      # NTC -> NCT (or NCW)
      ct = inputs.swapaxes(1, 2)
      ct = self.cnn(ct)
      ct = ct.swapaxes(1, 2)
  
      # now we are back in NTC
      if self.use_residual:
          ct = F.concat(ct, target, dim=2)
  
      # return the last state as the static code
      static_code = F.slice_axis(ct, axis=1, begin=-1, end=None)
      static_code = F.squeeze(static_code, axis=1)
  
      return static_code, ct
  
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 HierarchicalCausalConv1DEncoder obj's underlying member method code with example usage: obj.hybrid_forward(F, target, static_features, dynamic_features) and returns: static_code,  ct