GithubHelp home page GithubHelp logo

emeraldmath / vae-mnist-tensorflow2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hcnoh/vae-mnist-tensorflow2

0.0 1.0 0.0 535 KB

TensorFlow2 Implementation for VAE for generating MNIST

Jupyter Notebook 98.92% Python 1.08%

vae-mnist-tensorflow2's Introduction

Variational Autoencoder (VAE) Implementation for Generating MNIST Images in TensorFlow2

This repository is for the TensorFlow2 implementation for VAE. This repository provides the training module and Jupyter notebook for testing a generation of the trained models. MNIST dataset was used for this repository.

Install Dependencies

  1. Install Python 3.5.2.

  2. Install TensorFlow ver 2.0.0. If you can use a GPU machine, install the GPU version of TensorFlow, or just install the CPU version of it.

  3. Install Python packages(Requirements). You can install them simply by using following bash command.

    $ pip install -r requirements

    You can use Virtualenv, so that the packages for requirements can be managed easily. If your machine have Virtualenv package, the following bash command would be useful.

    $ virtualenv vae-mnist-tf2-venv
    $ source ./vae-mnist-tf2-venv/bin/activate
    $ pip install -r requirements.txt

Training

Note: MNIST-in-CSV dataset was used for this repository. But you can use MNIST dataset module in TensorFlow. But the following process is for just using MNIST-in-CSV dataset.

  1. Download the dataset.

    The link for MNIST-in-CSV: https://www.kaggle.com/oddrationale/mnist-in-csv

  2. Unpack the dataset.

    You can check that there are two csv files named mnist_train.csv and mnist_test.csv.

  3. Modify the path for dataset in config.py.

  4. Modify the path for directory for saving model checkpoint.

  5. Execute training process by train.py.

Checking Results and Testing Generation

The Jupyter notebook for checking results and testing the image generation is provided. Please check result_plot.ipynb.

Results

  1. Ploting the Encoder and Decoder Losses

  2. Image Generation Results

  3. Plotting the Latent Distribution

References

vae-mnist-tensorflow2's People

Contributors

hcnoh avatar

Watchers

James Cloos avatar

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.