class_docstr: Base class for all frequence-domain Enhancement loss modules.
class_docstr_tok: ["Base","class","for","all","frequence-domain","Enhancement","loss","modules","."]
code: def __init__(
      self,
      name,
      only_for_test=False,
      is_noise_loss=False,
      is_dereverb_loss=False,
  ):
      super().__init__()
      self._name = name
      # only used during validation
      self._only_for_test = only_for_test
      # only used to calculate the noise-related loss
      self._is_noise_loss = is_noise_loss
      # only used to calculate the dereverberation-related loss
      self._is_dereverb_loss = is_dereverb_loss
      if is_noise_loss and is_dereverb_loss:
          raise ValueError(
              "`is_noise_loss` and `is_dereverb_loss` cannot be True at the same time"
          )
  
imports: import math
  from abc import ABC, abstractmethod
  from functools import reduce
  import torch
  import torch.nn.functional
  from packaging.version import parse
  from espnet2.enh.layers.complex_utils import complex_norm, is_complex, new_complex_like
  from espnet2.enh.loss.criterions.abs_loss import AbsEnhLoss
label_desc: Use image node_id 7 to create a new FrequencyDomainLoss object from inherited base classes: AbsEnhLoss, ABC with example: obj = FrequencyDomainLoss(name, only_for_test, is_noise_loss, is_dereverb_loss)