class_docstr: R1 loss from [1], used following [2]
  [1] Mescheder et. al. - Which Training Methods for GANs do actually Converge? 2018, https://arxiv.org/abs/1801.04406
  [2] Karras et. al. - A Style-Based Generator Architecture for Generative Adversarial Networks, 2018 (https://arxiv.org/abs/1812.04948)
class_docstr_tok: ["R1","loss","from","[","1","]",",","used","following","[","2","]","[","1","]","Mescheder","et",".","al",".","-","Which","Training","Methods","for","GANs","do","actually","Converge","?","2018",",","https",":","\/\/arxiv.org\/abs\/1801.04406","[","2","]","Karras","et",".","al",".","-","A","Style-Based","Generator","Architecture","for","Generative","Adversarial","Networks",",","2018","(","https",":","\/\/arxiv.org\/abs\/1812.04948",")"]
code: def __init__(self, weight: float = 10.0):
      super().__init__()
      self.weight = weight
  
file_path: NeMo/nemo/collections/tts/losses/spectrogram_enhancer_losses.py
imports: import torch
  import torch.nn.functional
  from einops import rearrange
  from torch.autograd import grad
  from nemo.collections.tts.parts.utils.helpers import mask_sequence_tensor
label_desc: Use image node_id 1 to create a new GradientPenaltyLoss object from inherited base classes: torch.nn with example: obj = GradientPenaltyLoss(weight)