class_docstr: STFT losses.
  
  Args:
      n_fft (int): Size of FFT.
      hop_length (int): Hop length.
      win_length (int): Window length.
      window (str): Window function type.
      normalized (bool): Whether to use normalized STFT or not.
      epsilon (float): Epsilon for numerical stability.
docstr: Calculate forward propagation.
  
  Args:
      x (torch.Tensor): Predicted signal (B, T).
      y (torch.Tensor): Groundtruth signal (B, T).
  Returns:
      torch.Tensor: Spectral convergence loss value.
      torch.Tensor: Log STFT magnitude loss value.
docstr_tok: ["Calculate","forward","propagation",".","Args",":","x","(","torch.Tensor",")",":","Predicted","signal","(","B",",","T",")",".","y","(","torch.Tensor",")",":","Groundtruth","signal","(","B",",","T",")",".","Returns",":","torch.Tensor",":","Spectral","convergence","loss","value",".","torch.Tensor",":","Log","STFT","magnitude","loss","value","."]
code: def forward(
      self, x: torch.Tensor, y: torch.Tensor
  ) -> tp.Tuple[torch.Tensor, torch.Tensor]:
      """Calculate forward propagation.
  
      Args:
          x (torch.Tensor): Predicted signal (B, T).
          y (torch.Tensor): Groundtruth signal (B, T).
      Returns:
          torch.Tensor: Spectral convergence loss value.
          torch.Tensor: Log STFT magnitude loss value.
      """
      x_mag = _stft(
          x,
          self.n_fft,
          self.hop_length,
          self.win_length,
          self.window,
          self.normalized,
      )  # type: ignore
      y_mag = _stft(
          y,
          self.n_fft,
          self.hop_length,
          self.win_length,
          self.window,
          self.normalized,
      )  # type: ignore
      sc_loss = self.spectral_convergenge_loss(x_mag, y_mag)
      mag_loss = self.log_stft_magnitude_loss(x_mag, y_mag)
  
      return sc_loss, mag_loss
  
imports: import typing
  import torch
  from torch import nn
  from torch.nn import functional
label_desc: Use image node_id 2 for calling the STFTLosses obj's underlying member method code with example usage: obj.forward(x, y) and returns: sc_loss,  mag_loss