Pytorch implementation of WGAN-GP with a projection operator.
- Modification of link
- igul222/improved_wgan_training
- caogang/wgan-gp
- LayerNorm
- Python >= 3.6
- Pytorch >= v1.0.0
- Numpy
- SciPy
- tensorboardX (installation here). It is very convenient to see costs and results during training with TensorboardX for Pytorch
- TensorFlow for tensorboardX
-
gan_train.py
: This model is mainly based onGoodGenerator
andGoodDiscriminator
from Improved Training of Wasserstein GANs. Generator and discriminator are modified for 128x128 (width, height) dataset. -
Usage example, run:
python gan_train.py --dataset 'circle' --output 'output_dir'
. Then, the output file will be written to./output_dir
folder.
- This is the toy example dataset. You can use "train_toyCircle_3Ch_128.h5" dataset for the training.
- https://drive.google.com/drive/folders/1eQCZtni4UvilOI4-nQHBhRQyMvTpOizN?usp=sharing
During the implementation of this model, we built a test module to compare the result between original model (Tensorflow) and our model (Pytorch) for every layer we implemented. It is available at compare-tensorflow-pytorch
Results such as costs, generated images (every 200 iters) for tensorboard will be written to ./runs
folder.
To display the results to tensorboard, run: tensorboard --logdir runs