class_docstr: UHiFiGAN generator module.
class_docstr_tok: ["UHiFiGAN","generator","module","."]
docstr: Perform inference.
  
  Args:
      c (Union[Tensor, ndarray]): Input tensor (T, in_channels).
      normalize_before (bool): Whether to perform normalization.
  
  Returns:
      Tensor: Output tensor (T ** prod(upsample_scales), out_channels).
docstr_tok: ["Perform","inference",".","Args",":","c","(","Union","[","Tensor",",","ndarray","]",")",":","Input","tensor","(","T",",","in_channels",")",".","normalize_before","(","bool",")",":","Whether","to","perform","normalization",".","Returns",":","Tensor",":","Output","tensor","(","T","*","*","prod","(","upsample_scales",")",",","out_channels",")","."]
code: def inference(
      self, excitation=None, f0=None, c=None, normalize_before=False
  ):
      """Perform inference.
  
      Args:
          c (Union[Tensor, ndarray]): Input tensor (T, in_channels).
          normalize_before (bool): Whether to perform normalization.
  
      Returns:
          Tensor: Output tensor (T ** prod(upsample_scales), out_channels).
  
      """
      # print(len(c))
      # logging.info(f'len(c):{len(c)}')
      # excitation, f0, c = c
      if c is not None and not isinstance(c, torch.Tensor):
          c = torch.tensor(c, dtype=torch.float).to(
              next(self.parameters()).device
          )
      if excitation is not None and not isinstance(
          excitation, torch.Tensor
      ):
          excitation = torch.tensor(excitation, dtype=torch.float).to(
              next(self.parameters()).device
          )
      if f0 is not None and not isinstance(f0, torch.Tensor):
          f0 = torch.tensor(f0, dtype=torch.float).to(
              next(self.parameters()).device
          )
  
      # logging.info(f'excitation.shape:{excitation.shape}')
      # logging.info(f'f0.shape:{f0.shape}')
      # logging.info(f'c.shape:{c.shape}')
      # c = self.forward(None, None, c.transpose(1, 0).unsqueeze(0))
      c = self.forward(
          c.transpose(1, 0).unsqueeze(0),
          f0.unsqueeze(1).transpose(1, 0).unsqueeze(0),
          excitation.reshape(1, 1, -1),
      )
      return c.squeeze(0).transpose(1, 0)
  
file_path: espnet/espnet2/gan_svs/uhifigan/uhifigan.py
imports: import logging
  from typing import List, Optional
  import numpy
  import torch
  import torch.nn.functional
label_desc: Use image node_id 7 for calling the UHiFiGANGenerator obj's underlying member method code with example usage: obj.inference(excitation, f0, c, normalize_before) and returns: c