This is the official implementation of Sec. B.3 in Partial Distribution Matching via Partial Wasserstein Adversarial Networks, where PWAN is used as a drop-in replacement of WGAN for robust image generation.
To make a WGAN model more robust to outliers (make it a PWAN model), you only need to
- Use weight > 1 for the data sample.
- Make the output of discriminator negative, e.g.,
output=-torch.abs(output)
Training on Cifar10 dataset with a few mnist outliers:
Training data | WGAN | PWAN |
---|---|---|
![]() |
![]() |
![]() |
Plase see a.txt
for usage.
@misc{wang2024partialdistributionmatchingpartial,
title={Partial Distribution Matching via Partial Wasserstein Adversarial Networks},
author={Zi-Ming Wang and Nan Xue and Ling Lei and Rebecka Jörnsten and Gui-Song Xia},
year={2024},
eprint={2409.10499},
url={https://arxiv.org/abs/2409.10499},
}
@inproceedings{wang2022partial,
title={Partial Wasserstein Adversarial Network for Non-rigid Point Set Registration},
author={Zi-Ming Wang and Nan Xue and Ling Lei and Gui-Song Xia},
booktitle={International Conference on Learning Representations (ICLR)},
year={2022}
}
For any question, please contact me (wzm2256@gmail.com).
The code is available under a MIT license.