FabrizioMusacchio / wasserstein_gan

This repository contains some code for demonstrating the application of Wasserstein GANs (WGANs)

Home Page:https://www.fabriziomusacchio.com/blog/2023-07-29-wgan/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wasserstein GANs

This repository contains some code for demonstrating the application of Wasserstein GANs (WGANs). The code is used in the following blog posts:

For further details, please refer to these posts.

Results of training a default GAN on the MNIST dataset for 50 epochs: gif

Results of training a Wasserstein GAN on the same dataset: gif

Results of training a Wasserstein GAN using the POT library, avoiding the necessity of a discriminator: gif

Results of training a conditional GAN:

gif

For reproducibility:

conda create -n gan -y python=3.9
conda activate gan
conda install mamba -y
mamba install -y numpy matplotlib scikit-learn scipy pot tensorflow imageio pillow ipykernel
mamba install -y pytorch torchvision -c pytorch
pip install POT

If you want to run the code on a Mac with Apple Silicon (M1, M2), install tensorflow and pytorch as described here:

About

This repository contains some code for demonstrating the application of Wasserstein GANs (WGANs)

https://www.fabriziomusacchio.com/blog/2023-07-29-wgan/


Languages

Language:Python 100.0%