All Projects → X-czh → SeqGAN-PyTorch

X-czh / SeqGAN-PyTorch

Licence: other
Implementation of Sequence Generative Adversarial Nets with Policy Gradient in PyTorch

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to SeqGAN-PyTorch

Seqgan
A simplified PyTorch implementation of "SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient." (Yu, Lantao, et al.)
Stars: ✭ 502 (+1155%)
Mutual labels:  gan, policy-gradient
Pytorch Rl
This repository contains model-free deep reinforcement learning algorithms implemented in Pytorch
Stars: ✭ 394 (+885%)
Mutual labels:  gan, policy-gradient
ADL2019
Applied Deep Learning (2019 Spring) @ NTU
Stars: ✭ 20 (-50%)
Mutual labels:  gan, policy-gradient
Mlds2018spring
Machine Learning and having it Deep and Structured (MLDS) in 2018 spring
Stars: ✭ 124 (+210%)
Mutual labels:  gan, policy-gradient
IrwGAN
Official pytorch implementation of the IrwGAN for unaligned image-to-image translation
Stars: ✭ 33 (-17.5%)
Mutual labels:  gan
TRPO-TensorFlow
Trust Region Policy Optimization (TRPO) in pure TensorFlow
Stars: ✭ 17 (-57.5%)
Mutual labels:  policy-gradient
Deep-Reinforcement-Learning-CS285-Pytorch
Solutions of assignments of Deep Reinforcement Learning course presented by the University of California, Berkeley (CS285) in Pytorch framework
Stars: ✭ 104 (+160%)
Mutual labels:  policy-gradient
HandyRL
HandyRL is a handy and simple framework based on Python and PyTorch for distributed reinforcement learning that is applicable to your own environments.
Stars: ✭ 228 (+470%)
Mutual labels:  policy-gradient
GANs-Keras
GANs Implementations in Keras
Stars: ✭ 24 (-40%)
Mutual labels:  gan
wgan-gp
Pytorch implementation of Wasserstein GANs with Gradient Penalty
Stars: ✭ 161 (+302.5%)
Mutual labels:  gan
ZSL-ADA
Code accompanying the paper "A Generative Framework for Zero Shot Learning with Adversarial Domain Adaptation"
Stars: ✭ 18 (-55%)
Mutual labels:  gan
scrabble-gan
Adversarial Generation of Handwritten Text Images
Stars: ✭ 49 (+22.5%)
Mutual labels:  gan
CoMoGAN
CoMoGAN: continuous model-guided image-to-image translation. CVPR 2021 oral.
Stars: ✭ 139 (+247.5%)
Mutual labels:  gan
td-reg
TD-Regularized Actor-Critic Methods
Stars: ✭ 28 (-30%)
Mutual labels:  policy-gradient
PerceptualGAN
Pytorch implementation of Image Manipulation with Perceptual Discriminators paper
Stars: ✭ 119 (+197.5%)
Mutual labels:  gan
Reinforcement Learning
Deep Reinforcement Learning Algorithms implemented with Tensorflow 2.3
Stars: ✭ 61 (+52.5%)
Mutual labels:  policy-gradient
Paddle-RLBooks
Paddle-RLBooks is a reinforcement learning code study guide based on pure PaddlePaddle.
Stars: ✭ 113 (+182.5%)
Mutual labels:  policy-gradient
Deep-rl-mxnet
Mxnet implementation of Deep Reinforcement Learning papers, such as DQN, PG, DDPG, PPO
Stars: ✭ 26 (-35%)
Mutual labels:  policy-gradient
pix2pix-tensorflow
A minimal tensorflow implementation of pix2pix (Image-to-Image Translation with Conditional Adversarial Nets - https://phillipi.github.io/pix2pix/).
Stars: ✭ 22 (-45%)
Mutual labels:  gan
Semantic Pyramid for Image Generation
PyTorch reimplementation of the paper: "Semantic Pyramid for Image Generation" [CVPR 2020].
Stars: ✭ 45 (+12.5%)
Mutual labels:  gan

SeqGAN-PyTorch

An implementation of SeqGAN (Paper: SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient) in PyTorch. The code performs the experiment on synthetic data as described in the paper.

Usage

$ python main.py

Please refer to main.py for supported arguments. You can also change model parameters there.

Dependency

  • PyTorch 0.4.0+ (1.0 ready)
  • Python 3.5+
  • CUDA 8.0+ & cuDNN (For GPU)
  • numpy

Hacks and Observations

  • Using Adam for Generator and SGD for Discriminator
  • Discriminator should neither be trained too powerful (fail to provide useful feedback) nor too ill-performed (randomly guessing, unable to guide generation)
  • The GAN phase may not always lead to massive drops in NLL (sometimes very minimal or even increases NLL)

Sample Learning Curve

Learning curve of generator obtained after MLE training for 120 steps (1 epoch per round) followed by adversarial training for 150 rounds (1 epoch per round):

alt tag

Learning curve of discriminator obtained after MLE training for 50 steps (3 epochs per step) followed by adversarial training for 150 rounds (9 epoch per round):

alt tag

Acknowledgement

This code is based on Zhao Zijian's SeqGAN-PyTorch, Surag Nair's SeqGAN and Lantao Yu's original implementation in Tensorflow. Many thanks to Zhao Zijian, Surag Nair and Lantao Yu!

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].