class_docstr: Wrapper around a `generator` and a `critic` to create a GAN.
class_docstr_tok: ["Wrapper","around","a","`","generator","`","and","a","`","critic","`","to","create","a","GAN","."]
docstr: Put the module in generator mode if `gen_mode` is `True`, in critic mode otherwise.
docstr_tok: ["Put","the","module","in","generator","mode","if","`","gen_mode","`","is","`","True","`",",","in","critic","mode","otherwise","."]
code: def switch(
      self,
      gen_mode: None
      | bool = None,  # Whether the GAN should be set to generator mode
  ):
      "Put the module in generator mode if `gen_mode` is `True`, in critic mode otherwise."
      self.gen_mode = (
          (not self.gen_mode) if gen_mode is None else gen_mode
      )
  
imports: from __future__ import annotations
  from ..basics import *
  from .all import *
label_desc: Use image node_id 3 for calling the GANModule obj's underlying member method code with example usage: obj.switch(gen_mode) without return types