How can I implement a GAN network for text (review) generation?


How can I implement a GAN network for text (review) generation?

Please, can someone guide me to resource (code) to help in text generation?


Posted 2019-05-30T18:10:08.487

Reputation: 11

2Welcome to SE:AI. I'd recommend fleshing this out a little--as the question stands, you are likely to receive downvotes and close votes. – DukeZhou – 2019-05-30T21:06:27.940

You will not find it here, its advanced. Hey, i am also doing NN - tutorials and hobby home project. Prefer Python, Tensoflow. If you want, we can share contacts and to it together wia shared git account. First try word2vec approach applyed to GAN, then i got idea about semantical vector. – user8426627 – 2019-05-30T22:11:06.610

If you and Jerry want to work together, that's great. This site is not a project start-up or forum for meetups though, so you will get downvotes and maybe the answer will be deleted, as it is not a correct use of Stack Exchange. – Neil Slater – 2019-05-31T06:38:13.337



As @Clement mentions, text_gen_description gives a good overview!, but the paper seqGAN paper describes the REINFORCE approach more in depth, as they are the first to do it (i believe). This is probably the approach most take now of days when going the GAN route.

Note that just basic MLE training has shown promise with openAI's GPT2. When i need a text generator, fine tuning one of the provided models is usually my goto.

Also if your looking for seq gans code base (you asked for example code) here is is: git repo

Good Luck!


Posted 2019-05-30T18:10:08.487

Reputation: 1 845


For the resources, you can refer to this: If you want to generate text review for specific score, you can input a noise vector and the score to the generator. You could also make a vector filled with the number of score and add noise to that vector instead.

Clement Hui

Posted 2019-05-30T18:10:08.487

Reputation: 1 593