Discriminator network
The discriminator network in image-related GANs is a standard convolutional neural network. It takes in an image and outputs a single number that tells us whether the image is real or fake. The discriminator takes in an image, and learns the attributes of that image so that it may be a good judge vis-à-vis the outputs of the generator. In TensorFlow, we can create the discriminator as a function that we will then run in a TensorFlow session later on. This framework is more or less the same as you've seen in the previous sections with autoencoder and variational autoencoders; we'll use the higher level tf.layers api to create three main network layers and an output layer. After each of the main network layers, we'll add ...
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