speechbrain.nnet.loss.si_snr_loss module

# Authors:
  • Szu-Wei, Fu 2021

  • Mirco Ravanelli 2020

  • Samuele Cornell 2020

  • Hwidong Na 2020

  • Yan Gao 2020

  • Titouan Parcollet 2020

Summary

Functions:

si_snr_loss

Compute the si_snr score and return -1 * that score.

Reference

speechbrain.nnet.loss.si_snr_loss.si_snr_loss(y_pred_batch, y_true_batch, lens, reduction='mean')[source]

Compute the si_snr score and return -1 * that score.

This function can be used as a loss function for training with SGD-based updates.

Parameters
  • y_pred_batch (torch.Tensor) – The degraded (enhanced) waveforms.

  • y_true_batch (torch.Tensor) – The clean (reference) waveforms.

  • lens (torch.Tensor) – The relative lengths of the waveforms within the batch.

  • reduction (str) – The type of reduction (“mean” or “batch”) to use.

Example