class_docstr: Residual block module in WaveNet.
class_docstr_tok: ["Residual","block","module","in","WaveNet","."]
code: def __init__(
      self,
      kernel_size=3,
      res_channels=64,
      gate_channels=128,
      skip_channels=64,
      aux_channels=80,
      dropout=0.0,
      dilation=1,
      bias=True,
      use_causal_conv=False,
  ):
      super(ResidualBlock, self).__init__()
      self.dropout = dropout
      # no future time stamps available
      if use_causal_conv:
          padding = (kernel_size - 1) * dilation
      else:
          assert (
              kernel_size - 1
          ) % 2 == 0, "Not support even number kernel size."
          padding = (kernel_size - 1) // 2 * dilation
      self.use_causal_conv = use_causal_conv
  
      # dilation conv
      self.conv = torch.nn.Conv1d(
          res_channels,
          gate_channels,
          kernel_size,
          padding=padding,
          dilation=dilation,
          bias=bias,
      )
  
      # local conditioning
      if aux_channels > 0:
          self.conv1x1_aux = torch.nn.Conv1d(
              aux_channels, gate_channels, 1, bias=False
          )
      else:
          self.conv1x1_aux = None
  
      # conv output is split into two groups
      gate_out_channels = gate_channels // 2
      self.conv1x1_out = torch.nn.Conv1d(
          gate_out_channels, res_channels, 1, bias=bias
      )
      self.conv1x1_skip = torch.nn.Conv1d(
          gate_out_channels, skip_channels, 1, bias=bias
      )
  
imports: import torch
  from torch.nn import functional
label_desc: Use image node_id 1 to create a new ResidualBlock object from inherited base classes: torch.nn with example: obj = ResidualBlock(kernel_size, res_channels, gate_channels, skip_channels, aux_channels, dropout, dilation, bias, use_causal_conv)