def forward(self, x_mag, y_mag):
        """Calculate forward propagation.

        Args:
            x_mag (Tensor): Magnitude spectrogram of predicted signal (B, #frames, #freq_bins).
            y_mag (Tensor): Magnitude spectrogram of groundtruth signal (B, #frames, #freq_bins).

        Returns:
            Tensor: Spectral convergence loss value.

        """
        delta_win_length=5

        loss_1 = torch.norm(y_mag - x_mag, p="fro") / torch.norm(y_mag, p="fro")

        x_mag=x_mag.transpose(-1,-2)
        y_mag=y_mag.transpose(-1,-2)

        x_del = torchaudio.functional.compute_deltas(x_mag,win_length=delta_win_length)
        y_del = torchaudio.functional.compute_deltas(y_mag,win_length=delta_win_length)
        loss_2 = torch.norm(y_del - x_del, p="fro") / torch.norm(y_del, p="fro")
        
        x_acc = torchaudio.functional.compute_deltas(x_del,win_length=delta_win_length)
        y_acc = torchaudio.functional.compute_deltas(y_del,win_length=delta_win_length)
        loss_3 = torch.norm(y_acc - x_acc, p="fro") / torch.norm(y_acc, p="fro")

        return loss_1 + loss_2 + loss_3
Calculate forward propagation.

        Args:
            x_mag (Tensor): Magnitude spectrogram of predicted signal (B, #frames, #freq_bins).
            y_mag (Tensor): Magnitude spectrogram of groundtruth signal (B, #frames, #freq_bins).

        Returns:
            Tensor: Spectral convergence loss value.

        
train/target_speaker_extraction/losses/stft_loss.py