code: def __init__(self):
      super(Generator, self).__init__()
  
      def convlayer(
          n_input,
          n_output,
          k_size=5,
          stride=2,
          padding=0,
          output_padding=0,
      ):
          block = [
              nn.ConvTranspose2d(
                  n_input,
                  n_output,
                  kernel_size=k_size,
                  stride=stride,
                  padding=padding,
                  bias=False,
                  output_padding=output_padding,
              ),
              nn.BatchNorm2d(n_output),
              nn.ReLU(inplace=True),
          ]
          return block
  
      # MNIST (not constantinople.. sorry not LSUN)
      self.model = nn.Sequential(
          *convlayer(
              opt.latent_dim, 128, 7, 1, 0
          ),  # Fully connected, 128 x 7 x 7
          *convlayer(
              128, 64, 5, 2, 2, output_padding=1
          ),  # 64 x 14 x 14
          *convlayer(64, 32, 5, 2, 2, output_padding=1),  # 32 x 28 x 28
          nn.ConvTranspose2d(32, opt.channels, 5, 1, 2),  # 1 x 28 x 28
          nn.Tanh(),
      )
  
file_path: gans-with-pytorch/lsgan/lsgan.py
imports: import argparse
  import torch
  from torch import nn, optim
  from torch.autograd.variable import Variable
  from torchvision import transforms, datasets
  from torch.utils.data import DataLoader
label_desc: Use image node_id 1 to create a new Generator object from inherited base classes: nn with example: obj = Generator()