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:
- 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
- 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): ...