wlmnzf / BN

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spin up with Variational Bayes

What you get:

  1. mlp.py - MLP classifier on MNIST (in JAX and Haiku).
  2. vae.py - Bernoulli VAE generative model on MNIST.
    See: USING A BERNOULLI VAE ON REAL-VALUED OBSERVATIONS.
  3. bayes.py - Variational Bayes NN classifier on MNIST.

How to run:

Install dependencies with pip install -r requirements.txt. It was tested in Python 3.7. As always, use of a virtual environment is recommended.

Each file is an independent implementation that uses HumbleSL library (see below), run with: python <file>. Run python <file> --help to see all the configurable parameters.

Note on HumbleSL - deep supervised learning library.

It's a straightforward supervised learning (SL) Python library. It provides all the boilerplate code needed to do Deep SL: a network definition factory, metrics and losses, a data loader, train loop, etc.

It's backed by the JAX library and the Haiku framework. It uses TensorFlow Datasets for data loading and preprocessing.

About


Languages

Language:Python 100.0%