Giter VIP home page Giter VIP logo

hr-vae's Introduction

HR-VAE

Code for the paper "A Stable Variational Autoencoder for Text Modelling"

https://arxiv.org/pdf/1911.05343.pdf

Environment

Python 3.6+

Pytorch 1.0+

Run

python HR-VAE.py

Citation

@inproceedings{li2019stable,
  title={A Stable Variational Autoencoder for Text Modelling},
  author={Li, Ruizhe and Li, Xiao and Lin, Chenghua and Collinson, Matthew and Mao, Rui},
  booktitle={Proceedings of the 12th International Conference on Natural Language Generation},
  pages={594--599},
  year={2019}
}

hr-vae's People

Contributors

ruizheliuoa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hr-vae's Issues

Wrong use bidirectional LSTM

I might be mistaken, but the way bidirectional LSTMs are used in the encoder module does not really make sense.

In PyTorch, bidirectionality is handled by the underlying implementation of the LSTM module (e.g. by cuDNN) and is applied on the whole input sequence. As Encoder implements HR-LSTM by using a normal nn.LSTM but in a custom loop with one step at a time, the bidirectional LSTM would internally run bidirectional only on the given sequence of length one which practically would reduce it to two LSTMs being applied independently but both in forward direction.

I guess the simplest way to implement proper bidirectional handling would be to use two separate LSTMs where one processes the input in the normal and the other in the reverse direction.

Confusion between latent variable and LSTM hidden states in the code

Hello Sir,

From HR-VAE.py line 151, it seems that you're returning the zipped LSTM hidden states as a first output. You use it afterwards (line 309) as z. The way I understand it, this is not correct as you're supposed to sample z using the mu and logvar you produced with the linear layers in your encoder.
Is there something I'm missing here ?

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.