Picture generation — GAN of the week

Alexander Osipenko
Sep 5, 2018 · 2 min read

GAN of the Week is a series of notes about Generative Models, including GANs and Autoencoders. Every week I’ll review a new model to help you keep up with these rapidly developing types of Neural Networks.

This week GAN of the week is a Deep Convolutional GAN

Long story short Deep Convolutional GAN (DCGAN) is roughly same as Vanilla GAN but it contains convolutional layers, which is made more suitable for extracting important features from the pictures and therefore it is more suitable for picture generation.

DCGAN use advantages of convolutional neural networks (CNN), combining advantages from both worlds — good image representations that could be obtained by GAN, and reusing parts of the generator and discriminator networks as feature extractors for supervised tasks.

Figure 1 from the original paper: DCGAN generator used for LSUN scene modeling. A 100-dimensional uniform distribution Z is projected to a small spatial extent convolutional representation with many feature maps. A series of four fractionally-strived convolutions (in some recent papers, these are wrongly called deconvolutions) then convert this high-level representation into a 64 × 64 pixel image. Notably, no fully connected or pooling layers are used.

Results:

First of all, I started to use PyTorch (go PyTotch!) and it feels awesome, I highly recommend this framework for everyone.

I made DCGAN implementation with PyTorch, the code can be found on my GitHub. In order to improve stability, you can try to play with hyperparameters that can be found in config.toml.

Results with MNIST dataset
Results with Fashion MNIST dataset

I’m pretty pleased with the results, although they can be further improved by tweaking hyperparameters.

References:

DCGAN original paper — https://arxiv.org/pdf/1511.06434.pdf

My PyTorch DCGAN implementation — https://github.com/subpath/DCGAN_with_Pytorch

Have you tried DCGAN for picture generation?

Cindicator

Cindicator is a fintech company that enables effective asset management through predictive analytics based on Hybrid Intelligence. Here we share our news & views on token economy, smart money, Black Swans, data analysis, AI, Machine Learning, and other topics.

Alexander Osipenko

Written by

Data Scientist passioned in Deep Learning and Time Series analysis

Cindicator

Cindicator is a fintech company that enables effective asset management through predictive analytics based on Hybrid Intelligence. Here we share our news & views on token economy, smart money, Black Swans, data analysis, AI, Machine Learning, and other topics.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade