def call(self, y_mag, x_mag):
        """Calculate forward propagation.
        Args:
            y_mag (Tensor): Magnitude spectrogram of groundtruth signal (B, #frames, #freq_bins).
            x_mag (Tensor): Magnitude spectrogram of predicted signal (B, #frames, #freq_bins).
        Returns:
            Tensor: Spectral convergence loss value.
        """

        # length=int(tf.shape(y_mag)[-1]//2)
        # return tf.reduce_mean(tf.square(y_mag-x_mag))+tf.reduce_mean(tf.square(y_mag[:,:,length:]-x_mag[:,:,length:]))
        return tf.norm(y_mag - x_mag, ord="fro", axis=(-2, -1)) / (tf.norm(y_mag, ord="fro", axis=(-2, -1))+1e-6)
        # return SSIM(y_mag,x_mag)
Calculate forward propagation.
        Args:
            y_mag (Tensor): Magnitude spectrogram of groundtruth signal (B, #frames, #freq_bins).
            x_mag (Tensor): Magnitude spectrogram of predicted signal (B, #frames, #freq_bins).
        Returns:
            Tensor: Spectral convergence loss value.
        
vad/utils/stft.py