# altosaar/variational-autoencoder

Variational autoencoder implemented in tensorflow and pytorch (including inverse autoregressive flow)

Repository: https://github.com/altosaar/variational-autoencoder
Canonical: https://ross.abutalabs.com/products/variational-autoencoder
Homepage: https://jaan.io/what-is-variational-autoencoder-vae-tutorial/
Language: Python
License: MIT
License Family: permissive
Topics: vae, machine-learning, tensorflow, variational-autoencoder, variational-inference, probabilistic-graphical-models, deep, learning, deep-learning, deep-neural-networks, pytorch, unsupervised-learning, autoregressive-neural-networks
Last push: 2024-04-24T13:45:21+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3670, "days_push": 861, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1192, forks 258 (observed 2026-08-28T04:03:56.423751+00:00)

## What it is
A reference implementation of a variational autoencoder (VAE) in PyTorch, TensorFlow, and JAX, including an inverse autoregressive flow variational posterior. It trains on binarized MNIST and accompanies a well-known tutorial on variational autoencoders.

## Use cases
- learn how variational autoencoders work with runnable code
- implement a VAE in pytorch
- train a VAE with inverse autoregressive flow
- reproduce published MNIST marginal likelihood results
- compare VAE implementations across tensorflow, pytorch, and jax
- study variational inference and amortized inference

## When to choose
- you want a clean, minimal reference VAE implementation for learning or research
- you need an example of inverse autoregressive flow posteriors
- you want to reproduce benchmark log-likelihood numbers on binarized MNIST

## When to avoid
- you need a production-ready generative model for real-world images
- you want a high-level API or pretrained models
- you need actively developed features or support

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning
- domain: machine-learning, deep-learning, artificial-intelligence
- platform: python
- tags: variational-autoencoder, variational-inference, pytorch, tensorflow, jax, inverse-autoregressive-flow, generative-models, mnist, reference-implementation, gpu

## Member repositories
- altosaar/variational-autoencoder (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:56.423751+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:22:28.438167+00:00, confidence not recorded.
  - readme: https://github.com/altosaar/variational-autoencoder (fetched 2026-08-28T04:03:56.423751+00:00, sha f751f70bef35)
  - homepage: https://jaan.io/what-is-variational-autoencoder-vae-tutorial/ (fetched 2026-08-29T12:29:57.581088+00:00, sha 3f998adaae2e)
  - site_page: https://jaan.io/about (fetched 2026-08-29T12:29:57.590754+00:00, sha 638be91d6429)
- Data as of 2026-08-30T08:39:29.467469+00:00.
