class_docstr: Ying decoder module.
docstr: Generate yin prediction.
  
  Args:
      z_yin (torch.Tensor): Input yin target tensor of shape [B, yin_scope, C].
      z_mask (torch.Tensor): Input mask tensor of shape [B, yin_scope, 1].
      g (torch.Tensor, optional): Global conditioning tensor of shape
                                  [B, gin_channels, 1]. Defaults to None.
  
  Returns:
      torch.Tensor: Predicted yin tensor of shape [B, yin_scope, C].
code: def infer(self, z_yin, z_mask, g=None):
      """Generate yin prediction.
  
      Args:
          z_yin (torch.Tensor): Input yin target tensor of shape [B, yin_scope, C].
          z_mask (torch.Tensor): Input mask tensor of shape [B, yin_scope, 1].
          g (torch.Tensor, optional): Global conditioning tensor of shape
                                      [B, gin_channels, 1]. Defaults to None.
  
      Returns:
          torch.Tensor: Predicted yin tensor of shape [B, yin_scope, C].
  
      """
      B = z_yin.shape[0]
      scope_shift = torch.randint(
          -self.yin_shift_range,
          self.yin_shift_range,
          (B,),
          dtype=torch.int,
      )
      z_yin_crop = self.crop_scope(z_yin, self.yin_start, scope_shift)
      x = self.pre(z_yin_crop) * z_mask
      x = self.dec(x, z_mask, g=g)
      yin_hat_crop = self.proj(x) * z_mask
      return yin_hat_crop
  
file_path: espnet/espnet2/gan_svs/pits/ying_decoder.py
imports: import torch
  import torch.nn
  import espnet2.gan_svs.pits.modules
label_desc: Use image node_id 3 for calling the YingDecoder obj's underlying member method code with example usage: obj.infer(z_yin, z_mask, g) and returns: yin_hat_crop