code: def __init__(self):
      super(Discriminator, self).__init__()
  
      def convlayer(
          n_input,
          n_output,
          k_size=4,
          stride=2,
          padding=0,
          normalize=True,
          dilation=1,
      ):
          block = [
              nn.Conv2d(
                  n_input,
                  n_output,
                  kernel_size=k_size,
                  stride=stride,
                  padding=padding,
                  bias=False,
                  dilation=dilation,
              ),
          ]
          if normalize:
              block.append(nn.BatchNorm2d(n_output))
          block.append(nn.LeakyReLU(0.2, inplace=True))
          return block
  
      self.conv_block = nn.Sequential(  # 1 x 28 x 28
          *convlayer(
              opt.channels, 32, 5, 2, 2, normalize=False
          ),  # 32 x 14 x 14
          *convlayer(32, 64, 5, 2, 2),  # 64 x 7 x 7
      )
  
      self.fc_block = nn.Sequential(
          nn.Linear(64 * 7 * 7, 512),
          nn.BatchNorm1d(512),
          nn.LeakyReLU(0.2, inplace=True),
          nn.Linear(512, 1),
      )
  
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 Discriminator object from inherited base classes: nn with example: obj = Discriminator()