kaira.losses.audio.FeatureMatchingLoss

Inheritance diagram for FeatureMatchingLoss
- class kaira.losses.audio.FeatureMatchingLoss(model, layers, weights=None)[source]
Bases:
BaseLossFeature Matching Loss Module.
This module calculates the loss between features extracted from a pretrained model.
Methods
Initialize the FeatureMatchingLoss module.
Forward pass through the FeatureMatchingLoss module.
- forward(x: Tensor, target: Tensor) Tensor[source]
Forward pass through the FeatureMatchingLoss module.
- Parameters:
x (torch.Tensor) – The input audio tensor.
target (torch.Tensor) – The target audio tensor.
- Returns:
The feature matching loss.
- Return type: