espnet2.enh.loss.criterions.time_domain.SISNRLoss
Less than 1 minute
espnet2.enh.loss.criterions.time_domain.SISNRLoss
class espnet2.enh.loss.criterions.time_domain.SISNRLoss(clamp_db=None, zero_mean=True, eps=None, name=None, only_for_test=False, is_noise_loss=False, is_dereverb_loss=False)
Bases: TimeDomainLoss
SI-SNR (or named SI-SDR) loss
A more stable SI-SNR loss with clamp from fast_bss_eval.
clamp_db
float clamp the output value in [-clamp_db, clamp_db]
zero_mean
bool When set to True, the mean of all signals is subtracted prior.
eps
float Deprecated. Kept for compatibility.
Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(ref: Tensor, est: Tensor) → Tensor
SI-SNR forward.
- Parameters:
- ref – Tensor, (…, n_samples) reference signal
- est – Tensor (…, n_samples) estimated signal
- Returns: (…,) : the SI-SDR loss (negative si-sdr)
- Return type: loss