June 2018
Intermediate to advanced
276 pages
6h 26m
English
The discriminator is simply a classifier trained with supervised learning techniques to check if the image is real (1) or fake (0). It is trained by both the MNIST dataset and the generator samples. The discriminator will classify the MNIST data as real, and the generator samples as fake:
discriminator = Sequential([Dense(128, input_shape=(784,)),LeakyReLU(alpha=0.01),Dense(1),Activation('sigmoid')], name='discriminator')
By connecting the two networks, the generator and the discriminator, we produce a generative adversarial network:
gan = Sequential([generator,discriminator])
This is a high-level representation of a generative adversarial network:
To train the GAN, we need to train the generator (the discriminator is set ...
Read now
Unlock full access