Need help with DPGAN?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

lancopku
131 Stars 36 Forks 18 Commits 10 Opened issues

Description

Diversity-Promoting Generative Adversarial Network for Generating Informative and Diversified Text (EMNLP2018)

Services available

!
?

Need anything else?

DP-GAN

This is the code used in the paper titled DP-GAN: Diversity-Promoting Generative Adversarial Network for Generating Informative and Diversified Text. The link is http://arxiv.org/abs/1802.01345

Requirements

The software is written in tensorflow. It requires the following packages:

python3

Tensorflow 1.3

Prepare the data

python review_generation_dataset/generate_review.py

The sample is shown in reviewgenerationdataset/train (test). The whole Yelp dataset is avaliable at https://drive.google.com/open?id=1xCt04xWrVhbrSA7T5feV2WSukjmD4SnK

How it works

bash run.sh

The default options can be edited in main.py.

Output Folder Description

"discriminator_train" stores training data for our discriminator. Under this folder, "positive" folder stores the real-data text, and "negative" folder stores the generated text.

"discriminator_test" stores testing data for our discriminator.

"discriminator_result" stores the reward scores calculated by our discriminator at different training steps.

"MLE" stores the text generated by a pre-trained generator on testing set. Under this folder, "MLEsamplenegative" stores the data generated by a sampling mechanism. "MLEmaxtempnegative" stores the data generated by a maximum probability mechanism, which always chooses words with the highest probability. To show what high-quality reviews should be, we also give the real-data text at folder "MLEsamplepositive" and "MLEsample_positive".

"trainsamplegenerated" stores the data generated by DP-GAN using a sampling mechanism on training data.

"testsamplegenerated" stores the data generated by DP-GAN using a sampling mechanism on testing data.

"testmaxgenerated" stores the data generated by DP-GAN using a maximum probability mechanism on testing data.

Cite

If you use this code, please cite the following paper:

@inproceedings{dp-gan,

author = {Jingjing Xu, Xu Sun, Xuancheng Ren, Junyang Lin, Binzhen Wei, Wei Li},

title = {DP-GAN: Diversity-Promoting Generative Adversarial Network for Generating Informative and Diversified Text},

journal = {CoRR},

volume = {abs/1802.01345},

year = {2018},

url = http://arxiv.org/abs/1802.01345

}

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.