Keras adversarial GANs for forging CIFAR

Now we can use a GAN approach to learn how to forge CIFAR-10 and create synthetic images that look real. Let's see the open source code (https://github.com/bstriner/keras-adversarial/blob/master/examples/example_gan_cifar10.py).  Again, note that it uses the syntax of Keras 1.x, but it also runs on the top of Keras 2.x thanks to a convenient set of utility functions contained in legacy.py (https://github.com/bstriner/keras-adversarial/blob/master/keras_adversarial/legacy.py). First, the open source example imports a number of packages:

import matplotlib as mpl# This line allows mpl to run with no DISPLAY definedmpl.use('Agg')import pandas as pdimport numpy as npimport osfrom keras.layers import Dense, ...

Get Deep Learning with Keras now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.