Generating textures with a GAN 

One of the things so rarely covered in advanced deep learning books is the specifics of shaping data to input into a network. Along with shaping data is the need to alter the internals of a network to accommodate the new data. The final version of this example is Chapter_3_3.py, but for this exercise, start with the Chapter_3_wgan.py file and follow these steps:

  1. We will start by changing the training set of data from MNIST to CIFAR by swapping out the imports like so:
from keras.datasets import mnist  #remove or leavefrom keras.datasets import cifar100  #add
  1. At the start of the class, we will change the image size parameters from 28 x 28 grayscale to 32 x 32 color like so:
class WGAN(): def __init__(self): ...

Get Hands-On Deep Learning for Games 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.