code: def __init__(self, k: float = 1.0):
      super().__init__()
      self.k = k
  
file_path: carefree-learn/cflearn/losses/gan.py
imports: import torch
  from torch import nn
  from torch import Tensor
  from typing import Optional
  from typing import NamedTuple
  from ..misc.toolkit import get_gradient
label_desc: Use image node_id 1 to create a new GradientNormLoss object from inherited base classes: nn with example: obj = GradientNormLoss(k)