DCGANGenerator#
- class deepinv.models.DCGANGenerator(output_size: int = 64, nz: int = 100, ngf: int = 64, nc: int = 3)[source]#
Bases:
Module
DCGAN Generator.
The DCGAN generator model was originally proposed in Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks (Radford et al.) and takes a latent sample as input.
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:
- forward(input, *args, **kwargs)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
Examples using DCGANGenerator
:#
Imaging inverse problems with adversarial networks