Defining the generator model
The generator model is the neural network that creates synthetic target data out of random inputs. In this case, we will use a convolutional neural network (CNN) in reverse. What this means is that we will start with a vector of data points and create a fully connected layer, then reshape the data into the size that we want it to be. As a middle step, we will make the target shape only half the size and then we will upsample using a transposed convolution layer. In the end, we have an array of normalized pixel values that is the same shape as our target array. This then becomes the data object that will be used to try to fool the discriminator model. This array of synthetic values will, over time, be trained to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access