docstr: Compute Generator Loss values depending on training
  configuration 
docstr_tok: ["Compute","Generator","Loss","values","depending","on","training","configuration"]
code: def __init__(self, C):
      """Compute Generator Loss values depending on training
      configuration"""
      super(GeneratorLoss, self).__init__()
      assert not (
          C.use_mse_gan_loss and C.use_hinge_gan_loss
      ), " [!] Cannot use HingeGANLoss and MSEGANLoss together."
  
      self.use_stft_loss = C.use_stft_loss
      self.use_subband_stft_loss = C.use_subband_stft_loss
      self.use_mse_gan_loss = C.use_mse_gan_loss
      self.use_hinge_gan_loss = C.use_hinge_gan_loss
      self.use_feat_match_loss = C.use_feat_match_loss
  
      self.stft_loss_weight = C.stft_loss_weight
      self.subband_stft_loss_weight = C.subband_stft_loss_weight
      self.mse_gan_loss_weight = C.mse_G_loss_weight
      self.hinge_gan_loss_weight = C.hinge_G_loss_weight
      self.feat_match_loss_weight = C.feat_match_loss_weight
  
      if C.use_stft_loss:
          self.stft_loss = MultiScaleSTFTLoss(**C.stft_loss_params)
      if C.use_subband_stft_loss:
          self.subband_stft_loss = MultiScaleSubbandSTFTLoss(
              **C.subband_stft_loss_params
          )
      if C.use_mse_gan_loss:
          self.mse_loss = MSEGLoss()
      if C.use_hinge_gan_loss:
          self.hinge_loss = HingeGLoss()
      if C.use_feat_match_loss:
          self.feat_match_loss = MelganFeatureLoss()
  
imports: import torch
  from torch import nn
  from torch.nn import functional
label_desc: Use image node_id 1 to create a new GeneratorLoss object from inherited base classes: nn with example: obj = GeneratorLoss(C)