kaira.losses.audio.SpectralConvergenceLoss

Inheritance diagram for SpectralConvergenceLoss
- class kaira.losses.audio.SpectralConvergenceLoss[source]
Bases:
BaseLossSpectral Convergence Loss Module.
This module calculates the spectral convergence loss between the input and target spectra.
Methods
Initialize the SpectralConvergenceLoss module.
Forward pass through the SpectralConvergenceLoss module.
- forward(x_mag: Tensor, target_mag: Tensor) Tensor[source]
Forward pass through the SpectralConvergenceLoss module.
- Parameters:
x_mag (torch.Tensor) – The magnitude of the input spectrum.
target_mag (torch.Tensor) – The magnitude of the target spectrum.
- Returns:
The spectral convergence loss.
- Return type: