class_docstr: Conditional wavenet.
  
  Args:
      n_quantize (int): Number of quantization.
      n_aux (int): Number of aux feature dimension.
      n_resch (int): Number of filter channels for residual block.
      n_skipch (int): Number of filter channels for skip connection.
      dilation_depth (int): Number of dilation depth
          (e.g. if set 10, max dilation = 2^(10-1)).
      dilation_repeat (int): Number of dilation repeat.
      kernel_size (int): Filter size of dilated causal convolution.
      upsampling_factor (int): Upsampling factor.
class_docstr_tok: ["Conditional","wavenet",".","Args",":","n_quantize","(","int",")",":","Number","of","quantization",".","n_aux","(","int",")",":","Number","of","aux","feature","dimension",".","n_resch","(","int",")",":","Number","of","filter","channels","for","residual","block",".","n_skipch","(","int",")",":","Number","of","filter","channels","for","skip","connection",".","dilation_depth","(","int",")",":","Number","of","dilation","depth","(","e.g",".","if","set","10",",","max","dilation","=","2^","(","10-1",")",")",".","dilation_repeat","(","int",")",":","Number","of","dilation","repeat",".","kernel_size","(","int",")",":","Filter","size","of","dilated","causal","convolution",".","upsampling_factor","(","int",")",":","Upsampling","factor","."]
code: def __init__(
      self,
      n_quantize=256,
      n_aux=28,
      n_resch=512,
      n_skipch=256,
      dilation_depth=10,
      dilation_repeat=3,
      kernel_size=2,
      upsampling_factor=0,
  ):
      super(WaveNet, self).__init__()
      self.n_aux = n_aux
      self.n_quantize = n_quantize
      self.n_resch = n_resch
      self.n_skipch = n_skipch
      self.kernel_size = kernel_size
      self.dilation_depth = dilation_depth
      self.dilation_repeat = dilation_repeat
      self.upsampling_factor = upsampling_factor
  
      self.dilations = [
          2**i for i in range(self.dilation_depth)
      ] * self.dilation_repeat
      self.receptive_field = (self.kernel_size - 1) * sum(
          self.dilations
      ) + 1
  
      # for preprocessing
      self.onehot = OneHot(self.n_quantize)
      self.causal = CausalConv1d(
          self.n_quantize, self.n_resch, self.kernel_size
      )
      if self.upsampling_factor > 0:
          self.upsampling = UpSampling(self.upsampling_factor)
  
      # for residual blocks
      self.dil_sigmoid = nn.ModuleList()
      self.dil_tanh = nn.ModuleList()
      self.aux_1x1_sigmoid = nn.ModuleList()
      self.aux_1x1_tanh = nn.ModuleList()
      self.skip_1x1 = nn.ModuleList()
      self.res_1x1 = nn.ModuleList()
      for d in self.dilations:
          self.dil_sigmoid += [
              CausalConv1d(
                  self.n_resch, self.n_resch, self.kernel_size, d
              )
          ]
          self.dil_tanh += [
              CausalConv1d(
                  self.n_resch, self.n_resch, self.kernel_size, d
              )
          ]
          self.aux_1x1_sigmoid += [
              nn.Conv1d(self.n_aux, self.n_resch, 1)
          ]
          self.aux_1x1_tanh += [nn.Conv1d(self.n_aux, self.n_resch, 1)]
          self.skip_1x1 += [nn.Conv1d(self.n_resch, self.n_skipch, 1)]
          self.res_1x1 += [nn.Conv1d(self.n_resch, self.n_resch, 1)]
  
      # for postprocessing
      self.conv_post_1 = nn.Conv1d(self.n_skipch, self.n_skipch, 1)
      self.conv_post_2 = nn.Conv1d(self.n_skipch, self.n_quantize, 1)
  
imports: import logging
  import sys
  import time
  import numpy
  import torch
  import torch.nn.functional
  from torch import nn
label_desc: Use image node_id 1 to create a new WaveNet object from inherited base classes: nn with example: obj = WaveNet(n_quantize, n_aux, n_resch, n_skipch, dilation_depth, dilation_repeat, kernel_size, upsampling_factor)