All Projects → williamSYSU → Textgan Pytorch

williamSYSU / Textgan Pytorch

Licence: mit
TextGAN is a PyTorch framework for Generative Adversarial Networks (GANs) based text generation models.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Textgan Pytorch

Leakgan
The codes of paper "Long Text Generation via Adversarial Training with Leaked Information" on AAAI 2018. Text generation using GAN and Hierarchical Reinforcement Learning.
Stars: ✭ 533 (+11.27%)
Mutual labels:  natural-language-processing, generative-adversarial-network, text-generation
Seqgan
A simplified PyTorch implementation of "SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient." (Yu, Lantao, et al.)
Stars: ✭ 502 (+4.8%)
Mutual labels:  natural-language-processing, gan, generative-adversarial-network
Pytorch Mnist Celeba Gan Dcgan
Pytorch implementation of Generative Adversarial Networks (GAN) and Deep Convolutional Generative Adversarial Networks (DCGAN) for MNIST and CelebA datasets
Stars: ✭ 363 (-24.22%)
Mutual labels:  gan, generative-adversarial-network
Awesome Text Generation
A curated list of recent models of text generation and application
Stars: ✭ 370 (-22.76%)
Mutual labels:  natural-language-processing, text-generation
Pytorch Rl
This repository contains model-free deep reinforcement learning algorithms implemented in Pytorch
Stars: ✭ 394 (-17.75%)
Mutual labels:  gan, generative-adversarial-network
Gan Playground
GAN Playground - Experiment with Generative Adversarial Nets in your browser. An introduction to GANs.
Stars: ✭ 336 (-29.85%)
Mutual labels:  gan, generative-adversarial-network
Sdv
Synthetic Data Generation for tabular, relational and time series data.
Stars: ✭ 360 (-24.84%)
Mutual labels:  gan, generative-adversarial-network
Igan
Interactive Image Generation via Generative Adversarial Networks
Stars: ✭ 3,845 (+702.71%)
Mutual labels:  gan, generative-adversarial-network
Deep Generative Prior
Code for deep generative prior (ECCV2020 oral)
Stars: ✭ 308 (-35.7%)
Mutual labels:  gan, generative-adversarial-network
Tensorflow Tutorial
Tensorflow tutorial from basic to hard, 莫烦Python 中文AI教学
Stars: ✭ 4,122 (+760.54%)
Mutual labels:  gan, generative-adversarial-network
Simgan
Implementation of Apple's Learning from Simulated and Unsupervised Images through Adversarial Training
Stars: ✭ 406 (-15.24%)
Mutual labels:  gan, generative-adversarial-network
Wassersteingan.tensorflow
Tensorflow implementation of Wasserstein GAN - arxiv: https://arxiv.org/abs/1701.07875
Stars: ✭ 419 (-12.53%)
Mutual labels:  gan, generative-adversarial-network
Seq2seq Chatbot For Keras
This repository contains a new generative model of chatbot based on seq2seq modeling.
Stars: ✭ 322 (-32.78%)
Mutual labels:  gan, generative-adversarial-network
Psgan
PyTorch code for "PSGAN: Pose and Expression Robust Spatial-Aware GAN for Customizable Makeup Transfer" (CVPR 2020 Oral)
Stars: ✭ 318 (-33.61%)
Mutual labels:  gan, generative-adversarial-network
Cool Fashion Papers
👔👗🕶️🎩 Cool resources about Fashion + AI! (papers, datasets, workshops, companies, ...) (constantly updating)
Stars: ✭ 464 (-3.13%)
Mutual labels:  gan, generative-adversarial-network
Few Shot Patch Based Training
The official implementation of our SIGGRAPH 2020 paper Interactive Video Stylization Using Few-Shot Patch-Based Training
Stars: ✭ 313 (-34.66%)
Mutual labels:  gan, generative-adversarial-network
Anycost Gan
[CVPR 2021] Anycost GANs for Interactive Image Synthesis and Editing
Stars: ✭ 367 (-23.38%)
Mutual labels:  gan, generative-adversarial-network
Generative Compression
TensorFlow Implementation of Generative Adversarial Networks for Extreme Learned Image Compression
Stars: ✭ 428 (-10.65%)
Mutual labels:  gan, generative-adversarial-network
Pytorch Srgan
A modern PyTorch implementation of SRGAN
Stars: ✭ 289 (-39.67%)
Mutual labels:  gan, generative-adversarial-network
Zhihu
This repo contains the source code in my personal column (https://zhuanlan.zhihu.com/zhaoyeyu), implemented using Python 3.6. Including Natural Language Processing and Computer Vision projects, such as text generation, machine translation, deep convolution GAN and other actual combat code.
Stars: ✭ 3,307 (+590.4%)
Mutual labels:  natural-language-processing, gan

TextGAN-PyTorch

TextGAN is a PyTorch framework for Generative Adversarial Networks (GANs) based text generation models, including general text generation models and category text generation models. TextGAN serves as a benchmarking platform to support research on GAN-based text generation models. Since most GAN-based text generation models are implemented by Tensorflow, TextGAN can help those who get used to PyTorch to enter the text generation field faster.

If you find any mistake in my implementation, please let me know! Also, please feel free to contribute to this repository if you want to add other models.

LICENSE Contributions welcome

Requirements

To install, run pip install -r requirements.txt. In case of CUDA problems, consult the official PyTorch Get Started guide.

KenLM Installation

Implemented Models and Original Papers

General Text Generation

Category Text Generation

Get Started

  • Get Started
git clone https://github.com/williamSYSU/TextGAN-PyTorch.git
cd TextGAN-PyTorch
  • For real data experiments, all datasets (Image COCO, EMNLP NEWs, Movie Review, Amazon Review) can be downloaded from here.
  • Run with a specific model
cd run
python3 run_[model_name].py 0 0	# The first 0 is job_id, the second 0 is gpu_id

# For example
python3 run_seqgan.py 0 0

Features

  1. Instructor

    For each model, the entire runing process is defined in instructor/oracle_data/seqgan_instructor.py. (Take SeqGAN in Synthetic data experiment for example). Some basic functions like init_model()and optimize() are defined in the base class BasicInstructor in instructor.py. If you want to add a new GAN-based text generation model, please create a new instructor under instructor/oracle_data and define the training process for the model.

  2. Visualization

    Use utils/visualization.py to visualize the log file, including model loss and metrics scores. Custom your log files in log_file_list, no more than len(color_list). The log filename should exclude .txt.

  3. Logging

    The TextGAN-PyTorch use the logging module in Python to record the running process, like generator's loss and metric scores. For the convenience of visualization, there would be two same log file saved in log/log_****_****.txt and save/**/log.txt respectively. Furthermore, The code would automatically save the state dict of models and a batch-size of generator's samples in ./save/**/models and ./save/**/samples per log step, where ** depends on your hyper-parameters.

  4. Running Signal

    You can easily control the training process with the class Signal (please refer to utils/helpers.py) based on dictionary file run_signal.txt.

    For using the Signal, just edit the local file run_signal.txt and set pre_sig to Fasle for example, the program will stop pre-training process and step into next training phase. It is convenient to early stop the training if you think the current training is enough.

  5. Automatiaclly select GPU

    In config.py, the program would automatically select a GPU device with the least GPU-Util in nvidia-smi. This feature is enabled by default. If you want to manually select a GPU device, please uncomment the --device args in run_[run_model].py and specify a GPU device with command.

Implementation Details

SeqGAN

LeakGAN

MaliGAN

JSDGAN

RelGAN

DPGAN

DGSAN

CoT

SentiGAN

CatGAN

Licence

MIT lincense

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