class_docstr: ### Convolutional Discriminator Network
class_docstr_tok: ["#","#","#","Convolutional","Discriminator","Network"]
code: def __init__(self):
      super().__init__()
      # The input is $28 \times 28$ with one channel
      self.layers = nn.Sequential(
          # This gives $14 \times 14$
          nn.Conv2d(1, 256, 4, 2, 1, bias=False),
          nn.LeakyReLU(0.2, inplace=True),
          # This gives $7 \times 7$
          nn.Conv2d(256, 512, 4, 2, 1, bias=False),
          nn.BatchNorm2d(512),
          nn.LeakyReLU(0.2, inplace=True),
          # This gives $3 \times 3$
          nn.Conv2d(512, 1024, 3, 2, 0, bias=False),
          nn.BatchNorm2d(1024),
          nn.LeakyReLU(0.2, inplace=True),
          # This gives $1 \times 1$
          nn.Conv2d(1024, 1, 3, 1, 0, bias=False),
      )
      self.apply(_weights_init)
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/gan/dcgan/__init__.py
imports: import torch.nn
  from labml import experiment
  from labml.configs import calculate
  from labml_helpers.module import Module
  from labml_nn.gan.original.experiment import Configs
label_desc: Use image node_id 1 to create a new Discriminator object from inherited base classes: Module with example: obj = Discriminator()