Python
Need help with pytorch-spectral-normalization-gan?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.
christiancosgrove

Description

Paper by Miyato et al. https://openreview.net/forum?id=B1QRgziT-

490 Stars 81 Forks MIT License 41 Commits 10 Opened issues

Services available

Need anything else?

SN-GAN (spectral normalization GAN) in PyTorch

Based on the paper "Spectral Normalization for Generative Adversarial Networks" by Takeru Miyato, Toshiki Kataoka, Masanori Koyama, Yuichi Yoshida

ICLR 2018 preprint: https://openreview.net/forum?id=B1QRgziT-

CIFAR-10 Samples

with spectral normalization

Implementation Details

This code implements both DCGAN-like and ResNet GAN architectures. In addition, training with standard, Wasserstein, and hinge losses is possible.

To get ResNet working, initialization (Xavier/Glorot) turned out to be very important.

Training

Train ResNet generator and discriminator with hinge loss:

python main.py --model resnet --loss hinge

Train ResNet generator and discriminator with wasserstein loss:

python main.py --model resnet --loss wasserstein

Train DCGAN generator and discriminator with cross-entropy loss:

python main.py --model dcgan --loss bce

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.