This repository is the implementation for paper Adversarial Text Generation via Feature-Mover’s Distance
Python 2.7, Tensorflow 1.8.0
- Run:
python autoencoder.py
for MLE pre-train - Run:
python text_GAN.py
for adversarial training - Options: options can be made by changing
option
class.
model.py
: sinkhorn divergence edition
model2.py
: IPOT edition
MSCOCO dataset and WMT news dataset can be downloaded from link HERE: Download link
Use convert_new.py
to convert the indexed files to sentences.
Then use selfbleu.py
and testbleu.py
to evaluate the results.
Note that it is just a rough edition, you have to change the file names manually in the code, we will update this ASAP.
- Clean the code, make it easy to understand.
- Don't need to manually change the file names in the code.
- etc.
Please cite our paper if it helps with your research
@inproceedings{chen2018adversarial,
title={Adversarial Text Generation via Feature-Mover's Distance},
author={Chen, Liqun and Dai, Shuyang and Tao, Chenyang and Shen, Dinghan and Gan, Zhe and Zhang, Haichao and Zhang, Yizhe and Carin, Lawrence},
Booktitle={NIPS},
year={2018}
}
For any question or suggestions, feel free to contact my email.