Skip to content
TensorFlow implementation of "Improved Variational Autoencoders for Text Modeling using Dilated Convolutions"
Branch: master
Clone or download
Latest commit 05500f8 Oct 28, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
model initial commit Oct 18, 2017
utils initial commit Oct 18, 2017
.gitignore initial commit Oct 18, 2017
LICENSE Add LICENSE Oct 18, 2017
README.md Update README.md Oct 28, 2018
config.py initial commit Oct 18, 2017
sampling.py initial commit Oct 18, 2017
train_cvae.py initial commit Oct 18, 2017
train_vae.py initial commit Oct 18, 2017

README.md

TensorFlow implementation of "Improved Variational Autoencoders for Text Modeling using Dilated Convolutions"

paper:https://arxiv.org/abs/1702.08139v2

This is NOT an original implementation. There may be some minor differences from the original structure.

Prerequisites

  • Python 3.5
  • tensorflow-gpu==1.3.0
  • matplotlib==2.0.2
  • numpy==1.13.1
  • scikit-learn==0.19.0

Preparation

Dataset is not contained. Please prepare your own dataset.

  • Sentence

Pickle file of Numpy array of word ids (shape=[batch_size, sentence_length]).

  • Label

Pickle file of Numpy array of a label of a class (sentiment, category, etc.) (shape=[batch_size]).

  • Dictionary

Pickle file of Python dictionary. It should contain "<EOS>", "<PAD>", "<GO>" as meta words.

  dictionary = {word1: id1,
                word2: id2,
                ...}

Usage

Simple VAE

Train

  1. modify config.py
  2. run
  python train_vae.py

Get sample sentences

  1. modify sampling.py
  2. run
  python sampling.py

Semisupervised Classification

  1. modify config.py
  2. run
  python train_cvae.py

License

MIT

Author

Ryo Kamoi

You can’t perform that action at this time.