This repository implements a number of DGMs for semi-supervised learning in tensorflow. The repository contains implementations of:
- M2 - Semisupervised learning with deep generative models.
- ADGM, SDGM - Auxiliary deep generative models.
- SSLPE, SSLAPD - Bayesian semisupervised learning with deep generative models.
The models are implementated in TensorFlow 1.3.
Please make sure you have installed the requirements before executing the python scripts.
Install
pip install scipy
pip install numpy
pip install matplotlib
pip install tensorflow(-gpu)
The repository includes a template for designing further deep generative models. The templates make use of the library found in utils/dgm.py which contains Bayesian deep learning functionalities. An example script (run_mnist.py) will also be included which demonstrates how to successfully use the models and interact with the data wrapper found in data/SSL_DATA.py. The script trains a model of choice <M2, ADGM, SDGM, (aux, skip)-SSLPE, (aux, skip)-SSLAPD> using only 10 labeled examples form each class in MNIST, and should be run: .. code-block:: bash
python run_mnist.py <m2, adgm, sdgm, sslpe, sslapd,...>