espnet2.enh.loss.criterions.tf_domain.FrequencyDomainCrossEntropy
Less than 1 minute
espnet2.enh.loss.criterions.tf_domain.FrequencyDomainCrossEntropy
class espnet2.enh.loss.criterions.tf_domain.FrequencyDomainCrossEntropy(compute_on_mask=False, mask_type=None, ignore_id=-100, name=None, only_for_test=False, is_noise_loss=False, is_dereverb_loss=False)
Bases: FrequencyDomainLoss
Initializes internal Module state, shared by both nn.Module and ScriptModule.
property compute_on_mask : bool
forward(ref, inf) → Tensor
time-frequency cross-entropy loss.
- Parameters:
- ref – (Batch, T) or (Batch, T, C)
- inf – (Batch, T, nclass) or (Batch, T, C, nclass)
- Returns: (Batch,)
- Return type: loss
property mask_type : str