Code Monkey home page Code Monkey logo

vae-latent-structure's Introduction

Variational Autoencoders with Jointly Optimized Latent Dependency Structure

This is a PyTorch implementation of "Variational Autoencoders with Jointly Optimized Latent Dependency Structure" which appeared in ICLR '19.

Initial setup

Clone the repository

git clone https://github.com/ys1998/vae-latent-structure.git
cd vae-latent-structure/

Ensure that the requirements mentioned here are met.

Usage

# train
python train.py --config config.json
# resume from checkpoint
python train.py --resume <path_to_checkpoint>
# using multiple GPUs (equivalent to "CUDA_VISIBLE_DEVICES=2,3 python train.py -c config.py")
python train.py --device 2,3 -c config.json 
# test
python test.py --resume <path_to_checkpoint>
# visualization
tensorboard --logdir <path_to_log_dir>

Code description

You can find a detailed description of the folder structure here. The code is distributed across several branches, as described below

  1. master: original implementation (GraphVAE)
  2. LSTM: replacing top-down inference using a recurrent network (GraphLSTMVAE)
  3. vrnn: extension of GraphVAE to sequential data (RecurrentGraphVAE)

All models have been described in the model folder in the respective branch. Please look at our report for more details on our variants and results.

Configuration

All config files are specified in JSON format as described here. Model-specific parameters/options are provided via the arch field. The config.json files in each branch already contain default parameters for the respective model.

Acknowledgements

We would like to thank the authors of the PyTorch template https://github.com/victoresque/pytorch-template which served as a starting point for our project.

References

Jiawei He and Yu Gong and Joseph Marino and Greg Mori and Andreas Lehrmann. Variational Autoencoders with Jointly Optimized Latent Dependency Structure, ICLR 2019. URL https://openreview.net/forum?id=SJgsCjCqt7

vae-latent-structure's People

Contributors

nihal111 avatar ys1998 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

ymcidence

vae-latent-structure's Issues

KL calculation

Hello Yash,

I would like to ask you a question regarding your implementation (link attached) to the article- "Variational Autoencoders with Jointly Optimized Latent Dependency Structure".
According to the code, you calculated the KL for each node using normal gaussian prior with zero mean and unit variance, while the paper calculates the KL with another learned prior, which depends on the gates, c. as you can see in equation 8:
image

Appreciate your help.
Thanks.

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.