Skip to content

GAN API

Models

Pix2Pix

Paired image-to-image translation.

model = Pix2Pix(in_channels=3, out_channels=3)

CycleGAN

Unpaired translation between domains A and B.

model = CycleGAN(in_channels_a=3, in_channels_b=3)

ESRGAN

Super-resolution model.

model = ESRGAN(scale_factor=4)

Losses

AdversarialLoss

Generic GAN loss interface (BCE, MSE, Wasserstein).

PerceptualLoss

VGG-based feature matching loss.

\mathcal{L}_{p} = \| \phi(x) - \phi(y) \|_2^2