DCGANDiscriminator

class deepinv.models.DCGANDiscriminator(ndf: int = 64, nc: int = 3)[source]

Bases: Module

DCGAN Discriminator.

The DCGAN discriminator model was originally proposed in Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks (Radford et al.). Implementation taken from https://pytorch.org/tutorials/beginner/dcgan_faces_tutorial.html.

See Imaging inverse problems with adversarial networks for how to use this for adversarial training.

Parameters:
  • ndf (int) – hidden layer size, defaults to 64

  • nc (int) – number of input channels, defaults to 3

forward(input)[source]

Forward pass of discriminator model.

Parameters:

input (Tensor) – input image

Examples using DCGANDiscriminator:

Imaging inverse problems with adversarial networks

Imaging inverse problems with adversarial networks