espnet2.uasr.loss.discriminator_loss.UASRDiscriminatorLoss
Less than 1 minute
espnet2.uasr.loss.discriminator_loss.UASRDiscriminatorLoss
class espnet2.uasr.loss.discriminator_loss.UASRDiscriminatorLoss(weight: float = 1.0, smoothing: float = 0.0, smoothing_one_side: str2bool = False, reduction: str = 'sum')
Bases: AbsUASRLoss
discriminator loss for UASR.
Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(dense_y: Tensor, token_y: Tensor, is_discriminative_step: str2bool)
Forward.
- Parameters:
- dense_y – predicted logits of generated samples
- token_y – predicted logits of real samples