class_docstr: Callback to handle GAN Training.
class_docstr_tok: ["Callback","to","handle","GAN","Training","."]
docstr: Initialization.
docstr_tok: ["Initialization","."]
code: def before_fit(self):
      "Initialization."
      self.generator, self.critic = (
          self.model.generator,
          self.model.critic,
      )
      self.gen_mode = self.gen_first
      self.switch(self.gen_mode)
      self.crit_losses, self.gen_losses = [], []
      self.gen_loss.reset()
      self.crit_loss.reset()
  
imports: from __future__ import annotations
  from ..basics import *
  from .all import *
label_desc: Use image node_id 3 for calling the GANTrainer obj's underlying member method code with example usage: obj.before_fit() without return types