ESRGANDiscriminator#

class deepinv.models.ESRGANDiscriminator(img_size, filters=(64, 128, 256, 512), dim=2)[source]#

Bases: Module

ESRGAN Discriminator.

The ESRGAN discriminator model was originally proposed by Wang et al.[1]. Implementation taken from edongdongchen/EI.

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

Parameters:
  • img_size (tuple) – shape of input image

  • filter (tuple) – Width (number of filters) at each stage. This can also be used to control the number of stages (or also: the output shape relative to input shapes). Defaults to (64, 128, 256, 512)

  • dim (str, int) – Whether to build 2D or 3D network (if str, can be “2”, “2d”, “3D”, etc.)


References:

forward(x)[source]#

Forward pass of discriminator model.

Parameters:

x (torch.Tensor) – input image