class_docstr: Kernel predictor for the location-variable convolutions
class_docstr_tok: ["Kernel","predictor","for","the","location-variable","convolutions"]
docstr: Args:
      cond_channels (int): number of channel for the conditioning sequence,
      conv_in_channels (int): number of channel for the input sequence,
      conv_out_channels (int): number of channel for the output sequence,
      conv_layers (int):
      kpnet_
docstr_tok: ["Args",":","cond_channels","(","int",")",":","number","of","channel","for","the","conditioning","sequence",",","conv_in_channels","(","int",")",":","number","of","channel","for","the","input","sequence",",","conv_out_channels","(","int",")",":","number","of","channel","for","the","output","sequence",",","conv_layers","(","int",")",":","kpnet_"]
code: def __init__(  # pylint: disable=dangerous-default-value
      self,
      cond_channels,
      conv_in_channels,
      conv_out_channels,
      conv_layers,
      conv_kernel_size=3,
      kpnet_hidden_channels=64,
      kpnet_conv_size=3,
      kpnet_dropout=0.0,
      kpnet_nonlinear_activation="LeakyReLU",
      kpnet_nonlinear_activation_params={"negative_slope": 0.1},
  ):
      """
      Args:
          cond_channels (int): number of channel for the conditioning sequence,
          conv_in_channels (int): number of channel for the input sequence,
          conv_out_channels (int): number of channel for the output sequence,
          conv_layers (int):
          kpnet_
      """
      super().__init__()
  
      self.conv_in_channels = conv_in_channels
      self.conv_out_channels = conv_out_channels
      self.conv_kernel_size = conv_kernel_size
      self.conv_layers = conv_layers
  
      l_w = (
          conv_in_channels
          * conv_out_channels
          * conv_kernel_size
          * conv_layers
      )
      l_b = conv_out_channels * conv_layers
  
      padding = (kpnet_conv_size - 1) // 2
      self.input_conv = torch.nn.Sequential(
          torch.nn.Conv1d(
              cond_channels,
              kpnet_hidden_channels,
              5,
              padding=(5 - 1) // 2,
              bias=True,
          ),
          getattr(torch.nn, kpnet_nonlinear_activation)(
              **kpnet_nonlinear_activation_params
          ),
      )
  
      self.residual_conv = torch.nn.Sequential(
          torch.nn.Dropout(kpnet_dropout),
          torch.nn.Conv1d(
              kpnet_hidden_channels,
              kpnet_hidden_channels,
              kpnet_conv_size,
              padding=padding,
              bias=True,
          ),
          getattr(torch.nn, kpnet_nonlinear_activation)(
              **kpnet_nonlinear_activation_params
          ),
          torch.nn.Conv1d(
              kpnet_hidden_channels,
              kpnet_hidden_channels,
              kpnet_conv_size,
              padding=padding,
              bias=True,
          ),
          getattr(torch.nn, kpnet_nonlinear_activation)(
              **kpnet_nonlinear_activation_params
          ),
          torch.nn.Dropout(kpnet_dropout),
          torch.nn.Conv1d(
              kpnet_hidden_channels,
              kpnet_hidden_channels,
              kpnet_conv_size,
              padding=padding,
              bias=True,
          ),
          getattr(torch.nn, kpnet_nonlinear_activation)(
              **kpnet_nonlinear_activation_params
          ),
          torch.nn.Conv1d(
              kpnet_hidden_channels,
              kpnet_hidden_channels,
              kpnet_conv_size,
              padding=padding,
              bias=True,
          ),
          getattr(torch.nn, kpnet_nonlinear_activation)(
              **kpnet_nonlinear_activation_params
          ),
          torch.nn.Dropout(kpnet_dropout),
          torch.nn.Conv1d(
              kpnet_hidden_channels,
              kpnet_hidden_channels,
              kpnet_conv_size,
              padding=padding,
              bias=True,
          ),
          getattr(torch.nn, kpnet_nonlinear_activation)(
              **kpnet_nonlinear_activation_params
          ),
          torch.nn.Conv1d(
              kpnet_hidden_channels,
              kpnet_hidden_channels,
              kpnet_conv_size,
              padding=padding,
              bias=True,
          ),
          getattr(torch.nn, kpnet_nonlinear_activation)(
              **kpnet_nonlinear_activation_params
          ),
      )
  
      self.kernel_conv = torch.nn.Conv1d(
          kpnet_hidden_channels,
          l_w,
          kpnet_conv_size,
          padding=padding,
          bias=True,
      )
      self.bias_conv = torch.nn.Conv1d(
          kpnet_hidden_channels,
          l_b,
          kpnet_conv_size,
          padding=padding,
          bias=True,
      )
  
file_path: TTS/TTS/vocoder/layers/lvc_block.py
imports: import torch
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new KernelPredictor object from inherited base classes: torch.nn with example: obj = KernelPredictor(cond_channels, conv_in_channels, conv_out_channels, conv_layers, conv_kernel_size, kpnet_hidden_channels, kpnet_conv_size, kpnet_dropout, kpnet_nonlinear_activation, kpnet_nonlinear_activation_params)