speaker_loss#
(s3prl.nn.speaker_loss)
Speaker verification loss
- Authors:
Haibin Wu 2022
softmax#
- class s3prl.nn.speaker_loss.softmax(input_size: int, output_size: int)[source][source]#
Bases:
Module
The standard softmax loss in an unified interface for all speaker-related softmax losses
amsoftmax#
- class s3prl.nn.speaker_loss.amsoftmax(input_size: int, output_size: int, margin: float = 0.2, scale: float = 30)[source][source]#
Bases:
Module
AMSoftmax
- Parameters:
input_size (int) – The input feature size
output_size (int) – The output feature size
margin (float) – Hyperparameter denotes the margin to the decision boundry
scale (float) – Hyperparameter that scales the cosine value