All Projects → suragnair → Seqgan

suragnair / Seqgan

A simplified PyTorch implementation of "SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient." (Yu, Lantao, et al.)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Seqgan

Spectralnormalizationkeras
Spectral Normalization for Keras Dense and Convolution Layers
Stars: ✭ 100 (-80.08%)
Mutual labels:  gan, generative-adversarial-network, generative-model
Lggan
[CVPR 2020] Local Class-Specific and Global Image-Level Generative Adversarial Networks for Semantic-Guided Scene Generation
Stars: ✭ 97 (-80.68%)
Mutual labels:  gan, generative-adversarial-network, generative-model
Textgan Pytorch
TextGAN is a PyTorch framework for Generative Adversarial Networks (GANs) based text generation models.
Stars: ✭ 479 (-4.58%)
Mutual labels:  natural-language-processing, gan, generative-adversarial-network
ADL2019
Applied Deep Learning (2019 Spring) @ NTU
Stars: ✭ 20 (-96.02%)
Mutual labels:  generative-adversarial-network, gan, policy-gradient
Dragan
A stable algorithm for GAN training
Stars: ✭ 189 (-62.35%)
Mutual labels:  gan, generative-adversarial-network, generative-model
Mlds2018spring
Machine Learning and having it Deep and Structured (MLDS) in 2018 spring
Stars: ✭ 124 (-75.3%)
Mutual labels:  gan, generative-adversarial-network, policy-gradient
Pytorch Rl
This repository contains model-free deep reinforcement learning algorithms implemented in Pytorch
Stars: ✭ 394 (-21.51%)
Mutual labels:  gan, generative-adversarial-network, policy-gradient
Semantic image inpainting
Semantic Image Inpainting
Stars: ✭ 140 (-72.11%)
Mutual labels:  gan, generative-adversarial-network, generative-model
Triple Gan
See Triple-GAN-V2 in PyTorch: https://github.com/taufikxu/Triple-GAN
Stars: ✭ 203 (-59.56%)
Mutual labels:  gan, generative-adversarial-network, generative-model
Alae
[CVPR2020] Adversarial Latent Autoencoders
Stars: ✭ 3,178 (+533.07%)
Mutual labels:  gan, generative-adversarial-network, generative-model
Igan
Interactive Image Generation via Generative Adversarial Networks
Stars: ✭ 3,845 (+665.94%)
Mutual labels:  gan, generative-adversarial-network
Tf Seq2seq
Sequence to sequence learning using TensorFlow.
Stars: ✭ 387 (-22.91%)
Mutual labels:  natural-language-processing, natural-language-understanding
Simgan Captcha
Solve captcha without manually labeling a training set
Stars: ✭ 405 (-19.32%)
Mutual labels:  gan, generative-adversarial-network
Simgan
Implementation of Apple's Learning from Simulated and Unsupervised Images through Adversarial Training
Stars: ✭ 406 (-19.12%)
Mutual labels:  gan, generative-adversarial-network
Tensorflow Generative Model Collections
Collection of generative models in Tensorflow
Stars: ✭ 3,785 (+653.98%)
Mutual labels:  gan, generative-model
Tensorflow Tutorial
Tensorflow tutorial from basic to hard, 莫烦Python 中文AI教学
Stars: ✭ 4,122 (+721.12%)
Mutual labels:  gan, generative-adversarial-network
Wassersteingan.tensorflow
Tensorflow implementation of Wasserstein GAN - arxiv: https://arxiv.org/abs/1701.07875
Stars: ✭ 419 (-16.53%)
Mutual labels:  gan, generative-adversarial-network
Anycost Gan
[CVPR 2021] Anycost GANs for Interactive Image Synthesis and Editing
Stars: ✭ 367 (-26.89%)
Mutual labels:  gan, generative-adversarial-network
Botlibre
An open platform for artificial intelligence, chat bots, virtual agents, social media automation, and live chat automation.
Stars: ✭ 412 (-17.93%)
Mutual labels:  natural-language-processing, natural-language-understanding
Deep Learning Resources
由淺入深的深度學習資源 Collection of deep learning materials for everyone
Stars: ✭ 422 (-15.94%)
Mutual labels:  gan, generative-adversarial-network

seqGAN

A PyTorch implementation of "SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient." (Yu, Lantao, et al.). The code is highly simplified, commented and (hopefully) straightforward to understand. The policy gradients implemented are also much simpler than in the original work (https://github.com/LantaoYu/SeqGAN/) and do not involve rollouts- a single reward is used for the entire sentence (inspired by the examples in http://karpathy.github.io/2016/05/31/rl/).

The architectures used are different than those in the orignal work. Specifically, a recurrent bidirectional GRU network is used as the discriminator.

The code performs the experiment on synthetic data as described in the paper.

You are encouraged to raise any doubts regarding the working of the code as Issues.

To run the code:

python main.py

main.py should be your entry point into the code.

Hacks and Observations

The following hacks (borrowed from https://github.com/soumith/ganhacks) seem to have worked in this case:

  • Training Discriminator a lot more than Generator (Generator is trained only for one batch of examples, and increasing the batch size hurts stability)

  • Using Adam for Generator and Adagrad for Discriminator

  • Tweaking learning rate for Generator in GAN phase

  • Using dropout in both training and testing phase

  • Stablity is extremely sensitive to almost every parameter :/

  • The GAN phase may not always lead to massive drops in NLL (sometimes very minimal) - I suspect this is due to the very crude nature of the policy gradients implemented (without rollouts).

Sample Learning Curve

Learning curve obtained after MLE training for 100 epochs followed by adversarial training. (Your results may vary!)

alt tag

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].