espnet2.asvspoof.loss.oc_softmax_loss.ASVSpoofOCSoftmaxLoss
Less than 1 minute
espnet2.asvspoof.loss.oc_softmax_loss.ASVSpoofOCSoftmaxLoss
class espnet2.asvspoof.loss.oc_softmax_loss.ASVSpoofOCSoftmaxLoss(weight: float = 1.0, enc_dim: int = 128, m_real: float = 0.5, m_fake: float = 0.2, alpha: float = 20.0)
Bases: AbsASVSpoofLoss
Binary loss for ASV Spoofing.
Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(label: Tensor, emb: Tensor, **kwargs)
Forward.
- Parameters:
- label (torch.Tensor) – ground truth label [Batch, 1]
- emb (torch.Tensor) – encoder embedding output [Batch, T, enc_dim]
score(emb: Tensor)
Prediction.
- Parameters:emb (torch.Tensor) – encoder embedding output [Batch, T, enc_dim]