class_docstr: HiFiGAN generator module.
docstr: Perform inference.
  
  Args:
      c (torch.Tensor): Input tensor (T, in_channels).
      g (Optional[Tensor]): Global conditioning tensor (global_channels, 1).
  
  Returns:
      Tensor: Output tensor (T ** upsample_factor, out_channels).
docstr_tok: ["Perform","inference",".","Args",":","c","(","torch.Tensor",")",":","Input","tensor","(","T",",","in_channels",")",".","g","(","Optional","[","Tensor","]",")",":","Global","conditioning","tensor","(","global_channels",",","1",")",".","Returns",":","Tensor",":","Output","tensor","(","T","*","*","upsample_factor",",","out_channels",")","."]
code: def inference(
      self, c: torch.Tensor, g: Optional[torch.Tensor] = None
  ) -> torch.Tensor:
      """Perform inference.
  
      Args:
          c (torch.Tensor): Input tensor (T, in_channels).
          g (Optional[Tensor]): Global conditioning tensor (global_channels, 1).
  
      Returns:
          Tensor: Output tensor (T ** upsample_factor, out_channels).
  
      """
      if g is not None:
          g = g.unsqueeze(0)
      c = self.forward(c.transpose(1, 0).unsqueeze(0), g=g)
      return c.squeeze(0).transpose(1, 0)
  
imports: import copy
  import logging
  from typing import Any, Dict, List, Optional
  import numpy
  import torch
  import torch.nn.functional
  from espnet2.gan_tts.hifigan.residual_block import ResidualBlock
label_desc: Use image node_id 6 for calling the HiFiGANGenerator obj's underlying member method code with example usage: obj.inference(c, g) and returns: c