class_docstr: 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.
  
  Attributes:
      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 (bool)
          whether or not to normalize the variance when calculating the loss.
      reduction (str)
          select from "sum" and "mean"
class_docstr_tok: ["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",".","Attributes",":","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","(","bool",")","whether","or","not","to","normalize","the","variance","when","calculating","the","loss",".","reduction","(","str",")","select","from","``","sum","''","and","``","mean","''"]
code: def __init__(
      self,
      window_sz=[512],
      hop_sz=None,
      eps=1e-8,
      time_domain_weight=0.5,
      normalize_variance=False,
      reduction="sum",
      name=None,
      only_for_test=False,
      is_noise_loss=False,
      is_dereverb_loss=False,
  ):
      _name = "TD_L1_loss" if name is None else name
      super().__init__(
          _name,
          only_for_test=only_for_test,
          is_noise_loss=is_noise_loss,
          is_dereverb_loss=is_dereverb_loss,
      )
  
      assert all([x % 2 == 0 for x in window_sz])
      self.window_sz = window_sz
  
      if hop_sz is None:
          self.hop_sz = [x // 2 for x in window_sz]
      else:
          self.hop_sz = hop_sz
  
      self.time_domain_weight = time_domain_weight
      self.normalize_variance = normalize_variance
      self.eps = eps
      self.stft_encoders = torch.nn.ModuleList([])
      for w, h in zip(self.window_sz, self.hop_sz):
          stft_enc = Stft(
              n_fft=w,
              win_length=w,
              hop_length=h,
              window=None,
              center=True,
              normalized=False,
              onesided=True,
          )
          self.stft_encoders.append(stft_enc)
  
      assert reduction in ("sum", "mean")
      self.reduction = reduction
  
imports: import logging
  import math
  from abc import ABC
  import ci_sdr
  import fast_bss_eval
  import torch
  from packaging.version import parse
  from torch_complex.tensor import ComplexTensor
  from espnet2.enh.loss.criterions.abs_loss import AbsEnhLoss
  from espnet2.layers.stft import Stft
label_desc: Use image node_id 1 to create a new MultiResL1SpecLoss object from inherited base classes: TimeDomainLoss with example: obj = MultiResL1SpecLoss(window_sz, hop_sz, eps, time_domain_weight, normalize_variance, reduction, name, only_for_test, is_noise_loss, is_dereverb_loss)