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 defined mpl.use('Agg') import pandas as pd import numpy as np import os from keras.layers import Dense, Reshape, Flatten, Dropout, LeakyReLU, Activation, BatchNormalization, SpatialDropout2D from keras.layers.convolutional import Convolution2D, UpSampling2D, MaxPooling2D, AveragePooling2D from keras.models import Sequential, Model from keras...