class_docstr: >>> GAN(img_shape=(1, 8, 8))  # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
  GAN(
    (generator): Generator(
      (model): Sequential(...)
    )
    (discriminator): Discriminator(
      (model): Sequential(...)
    )
  )
class_docstr_tok: [">",">",">","GAN","(","img_shape=","(","1",",","8",",","8",")",")","#","doctest",":","+ELLIPSIS","+NORMALIZE_WHITESPACE","GAN","(","(","generator",")",":","Generator","(","(","model",")",":","Sequential","(","...",")",")","(","discriminator",")",":","Discriminator","(","(","model",")",":","Sequential","(","...",")",")",")"]
code: def __init__(
      self,
      img_shape: tuple = (1, 28, 28),
      lr: float = 0.0002,
      b1: float = 0.5,
      b2: float = 0.999,
      latent_dim: int = 100,
  ):
      super().__init__()
      self.save_hyperparameters()
      self.automatic_optimization = False
  
      # networks
      self.generator = Generator(
          latent_dim=self.hparams.latent_dim, img_shape=img_shape
      )
      self.discriminator = Discriminator(img_shape=img_shape)
  
      self.validation_z = torch.randn(8, self.hparams.latent_dim)
  
      self.example_input_array = torch.zeros(2, self.hparams.latent_dim)
  
imports: from argparse import ArgumentParser, Namespace
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from lightning.pytorch import cli_lightning_logo
  from lightning.pytorch.core import LightningModule
  from lightning.pytorch.demos.mnist_datamodule import MNISTDataModule
  from lightning.pytorch.trainer import Trainer
  from lightning.pytorch.utilities.imports import _TORCHVISION_AVAILABLE
label_desc: Use image node_id 1 to create a new GAN object from inherited base classes: LightningModule with example: obj = GAN(img_shape, lr, b1, b2, latent_dim)