espnet2.asvspoof.loss.am_softmax_loss.ASVSpoofAMSoftmaxLoss
Less than 1 minute
espnet2.asvspoof.loss.am_softmax_loss.ASVSpoofAMSoftmaxLoss
class espnet2.asvspoof.loss.am_softmax_loss.ASVSpoofAMSoftmaxLoss(weight: float = 1.0, enc_dim: int = 128, s: float = 20, m: float = 0.5)
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]