espnet2.enh.loss.criterions.time_domain.MultiResL1SpecLoss
espnet2.enh.loss.criterions.time_domain.MultiResL1SpecLoss
class espnet2.enh.loss.criterions.time_domain.MultiResL1SpecLoss(window_sz=[512], hop_sz=None, eps=1e-08, time_domain_weight=0.5, normalize_variance=False, reduction='sum', name=None, only_for_test=False, is_noise_loss=False, is_dereverb_loss=False)
Bases: TimeDomainLoss
Multi-Resolution L1 time-domain + STFT mag loss
Reference: Lu, Y. J., Cornell, S., Chang, X., Zhang, W., Li, C., Ni, Z., … & Watanabe, S. Towards Low-Distortion Multi-Channel Speech Enhancement: The ESPNET-Se Submission to the L3DAS22 Challenge. ICASSP 2022 p. 9201-9205.
window_sz
(list) list of STFT window sizes.
hop_sz
(list, optional) list of hop_sizes, default is each window_sz // 2.
eps
(float) stability epsilon
time_domain_weight
(float) weight for time domain loss.
normalize_variance
whether or not to normalize the variance when calculating the loss.
- Type: bool
reduction
select from “sum” and “mean”
- Type: str
Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(target: Tensor, estimate: Tensor)
forward.
- Parameters:
- target – (Batch, T)
- estimate – (Batch, T)
- Returns: (Batch,)
- Return type: loss
get_magnitude(stft, eps=1e-06)
property name : str