July 2019
Intermediate to advanced
512 pages
19h 39m
English
Now we will see how to implement DCGAN in TensorFlow. We will learn how to use DCGAN with images from the Canadian Institute For Advanced Research (CIFAR)-10 dataset. CIFAR-10 consists of 60,000 images from 10 different classes that include airplanes, cars, birds, cats, deer, dogs, frogs, horses, ships, and trucks. We will examine how we can use DCGAN to generate such images.
First, import the required libraries:
import warningswarnings.filterwarnings('ignore')import numpy as npimport tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_datatf.logging.set_verbosity(tf.logging.ERROR)from keras.datasets import cifar10import matplotlib.pyplot as plt%matplotlib inlinefrom IPython import ...Read now
Unlock full access