Skip to content

Pytorch implementation of the paper (q,p)-Wasserstein GANs: Comparing Ground Metrics for Wasserstein GANs (https://arxiv.org/abs/1902.03642)

Notifications You must be signed in to change notification settings

sverdoot/qp-wgan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(q,p)-Wasserstein GANs

This repository contains Pytorch implementation of a method and experiments from the paper (q,p)-Wasserstein GANs: Comparing Ground Metrics for Wasserstein GANs.

Table of content

Repository structure

.
├── bin
│   ├── cifar10.sh
│   └── mnist.sh
├── data
├── figs
│   └── gif
├── models
│   ├── __init__.py
│   ├── cifar10.py
│   ├── gaussian_model.py
│   └── mnist.py
├── src
│   ├── __init__.py
│   ├── main.py
│   ├── qpwgan.py
│   ├── discrete_measures.py
│   ├── gaussian_mixture.py
│   ├── metrics.py
│   ├── plot_nearest_distance.py
│   └── utils.py
├── README.md
├── requirements.txt
└── setup.py

Installation

pip install -r requirements.txt
pip install -e .

Usage

To use wandb tracking, do in advance

wandb login

Optimization of Wasserstein metric on discrete measure:

python src/discrete_measures.py

Approximating a Gaussian mixture distribution:

python src/gaussian_mixture.py \
                 --n_epoch 601 \
                 --search_space full \
                 --n_critic_iter 2 \
                 --reg_coef1 0.1 \
                 --reg_coef2 1 \
                 --batch_size 64

MNIST

bash bin/mnist.sh

Some results

CIFAR10

bash bin/cifar10.sh

CIFAR10 Progress

q=1, p=1, critic iters = 1 q=1, p=1, critic iters = 5
q=1, p=2, critic iters = 1 q=1, p=2, critic iters = 5
q=2, p=2, critic iters = 1 q=2, p=2, critic iters = 5

About

Pytorch implementation of the paper (q,p)-Wasserstein GANs: Comparing Ground Metrics for Wasserstein GANs (https://arxiv.org/abs/1902.03642)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •