hcnoh / DCGAN-tensorflow2

TensorFlow2 Implementation for DCGAN

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DCGAN Implementation for Generating MNIST Images in TensorFlow2

This repository is for the TensorFlow2 implementation for DCGAN. 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 dcgan-tf2-venv
    $ source ./dcgan-tf2-venv/bin/activate
    $ pip install -r requirements.txt

Training

Note: TensorFlow provides dataset modules for some well known datasets such as MNIST, CIFAR-10 etc. In this repository, the only usage for TensorFlow MNIST dataset module was implemented yet. Usages for other datasets will be implemented too.

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

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

  3. 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 Generator and Discriminator Losses

  2. Image Generation Results

References

Author

Hyungcheol Non / About Me

About

TensorFlow2 Implementation for DCGAN


Languages

Language:Jupyter Notebook 99.1%Language:Python 0.9%