class_docstr: TADEResBlock module.
docstr: Calculate forward propagation.
  
  Args:
      x (Tensor): Input tensor (B, in_channels, T).
      c (Tensor): Auxiliary input tensor (B, aux_channels, T').
  
  Returns:
      Tensor: Output tensor (B, in_channels, T * in_upsample_factor).
      Tensor: Upsampled auxirialy tensor (B, in_channels, T * in_upsample_factor).
docstr_tok: ["Calculate","forward","propagation",".","Args",":","x","(","Tensor",")",":","Input","tensor","(","B",",","in_channels",",","T",")",".","c","(","Tensor",")",":","Auxiliary","input","tensor","(","B",",","aux_channels",",","T","'",")",".","Returns",":","Tensor",":","Output","tensor","(","B",",","in_channels",",","T","*","in_upsample_factor",")",".","Tensor",":","Upsampled","auxirialy","tensor","(","B",",","in_channels",",","T","*","in_upsample_factor",")","."]
code: def forward(self, x: torch.Tensor, c: torch.Tensor) -> torch.Tensor:
      """Calculate forward propagation.
  
      Args:
          x (Tensor): Input tensor (B, in_channels, T).
          c (Tensor): Auxiliary input tensor (B, aux_channels, T').
  
      Returns:
          Tensor: Output tensor (B, in_channels, T * in_upsample_factor).
          Tensor: Upsampled auxirialy tensor (B, in_channels, T * in_upsample_factor).
  
      """
      residual = x
  
      x, c = self.tade1(x, c)
      x = self.gated_conv1(x)
      xa, xb = x.split(x.size(1) // 2, dim=1)
      x = self.gated_function(xa) * torch.tanh(xb)
  
      x, c = self.tade2(x, c)
      x = self.gated_conv2(x)
      xa, xb = x.split(x.size(1) // 2, dim=1)
      x = self.gated_function(xa) * torch.tanh(xb)
  
      # NOTE(kan-bayashi): Return upsampled aux here?
      return self.upsample(residual) + x, c
  
file_path: espnet/espnet2/gan_tts/style_melgan/tade_res_block.py
imports: from functools import partial
  import torch
label_desc: Use image node_id 2 for calling the TADEResBlock obj's underlying member method code with example usage: obj.forward(x, c) and returns: unknown,  c