class_docstr: Callback to handle GAN Training.
class_docstr_tok: ["Callback","to","handle","GAN","Training","."]
code: def __init__(
      self,
      switch_eval: bool = False,  # Whether the model should be set to eval mode when calculating loss
      clip: None | float = None,  # How much to clip the weights
      beta: float = 0.98,  # Exponentially weighted smoothing of the losses `beta`
      gen_first: bool = False,  # Whether we start with generator training
      show_img: bool = True,  # Whether to show example generated images during training
  ):
      store_attr("switch_eval,clip,gen_first,show_img")
      self.gen_loss, self.crit_loss = AvgSmoothLoss(
          beta=beta
      ), AvgSmoothLoss(beta=beta)
  
imports: from __future__ import annotations
  from ..basics import *
  from .all import *
label_desc: Use image node_id 1 to create a new GANTrainer object from inherited base classes: Callback with example: obj = GANTrainer(switch_eval, clip, beta, gen_first, show_img)