codes for TokManGAN: Token Manipulation Generative Adversarial Network for Text Generation
This is a hierarchical sequence generation model, that first decides whether a blank is added or not,
if a blank is added then fill it, otherwise decides how utilize a given token (use, ignore, etc).
python train.py --gan_model tokmangan --mode MLE --dataset coco --unit_size 32
python train.py --gan_model tokmangan --mode GAN --dataset coco --unit_size 32
- For evaluation
python generate_for_eval.py -g tokmangan -t GAN -d coco -s 32
- For checking details (You can find result files that start with 'details' in here)
python generate_for_details.py -g tokmangan -t GAN -d coco -s 32 --n_generate_per_seed 10 --gen_vd_keep_prob 0.8
- You can also produce MaskGAN model using on this project. (specify the option in the script as --gan_model maskgan or -g maskgan)
- Code is tested on TensorFlow version 1.14 for Python 3.6.
- For evaluation you need to download the external project - GANsFallingShort
We have helped a lot in the following projects.