GithubHelp home page GithubHelp logo

lm_wae's Introduction

A simple baseline for vae

This is my codebase for the vae language model, implemented in pytorch(1.1.0):

Overview

This package contains the code for ptb task

For the above task, the code for the following model has been made available:

  1. Variational autoencoder (vae)
  2. Wasserstein autoencoder (wae-det)
  3. Generation
  4. Need more time...

Datasets

The models mentioned in the paper have been evaluated on two datasets:

  • [PTB] already in the data folder
  • SNLI Sentences
  • other datasets that can be used in language model(ontonotes,iwslt,etc.)

Requirements

  • torchvision==1.1.0
  • spacy
  • sklearn
  • matplotlib
  • nltk>=3.4.5
  • torchtext

Instructions

  1. Create a virtual environment using conda
conda create -n vae python=3.6
  1. Activate virtual environment and install the required packages.
source activate
conda activate vae
cd lm_wae/
pip install -r requirements.txt
  1. Train the desired model, set configurations in the config.conf file. For example,
cd runner
python train.py 
  • The model checkpoints are stored in log/ptb/ directory, the summaries for Tensorboard are stored in runner/runs/ directory. As training progresses, the result are dumped into log/ptb/ directory.
  • You can also see the generation result while training the model. By default for vae and wae, sampling from latent space is carried out within one standard deviation from the mean .
  1. Unfinished

lm_wae's People

Contributors

xzloqy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.