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"]
code: def __init__(
      self,
      dilation_seq: List[int],
      kernel_size_seq: List[int],
      channels_seq: List[int],
      use_residual: bool = False,
      use_static_feat: bool = False,
      use_dynamic_feat: bool = False,
      **kwargs,
  ) -> None:
      assert all(
          [x > 0 for x in dilation_seq]
      ), "`dilation_seq` values must be greater than zero"
      assert all(
          [x > 0 for x in kernel_size_seq]
      ), "`kernel_size_seq` values must be greater than zero"
      assert all(
          [x > 0 for x in channels_seq]
      ), "`channel_dim_seq` values must be greater than zero"
  
      super().__init__(**kwargs)
  
      self.use_residual = use_residual
      self.use_static_feat = use_static_feat
      self.use_dynamic_feat = use_dynamic_feat
      self.cnn = nn.HybridSequential()
  
      it = zip(channels_seq, kernel_size_seq, dilation_seq)
      for layer_no, (channels, kernel_size, dilation) in enumerate(it):
          convolution = CausalConv1D(
              channels=channels,
              kernel_size=kernel_size,
              dilation=dilation,
              activation="relu",
              prefix=f"conv_{layer_no:#02d}'_",
          )
          self.cnn.add(convolution)
  
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 1 to create a new HierarchicalCausalConv1DEncoder object from inherited base classes: Seq2SeqEncoder with example: obj = HierarchicalCausalConv1DEncoder(dilation_seq, kernel_size_seq, channels_seq, use_residual, use_static_feat, use_dynamic_feat)