16.03.2021 Views

Advanced Deep Learning with Keras

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Generative Adversarial Networks (GANs)

39999: [discriminator loss: 0.532917, acc: 0.742188] [adversarial loss:

0.824350, acc: 0.453125]

Figure 4.2.2: The fake images generated by the DCGAN generator at different training steps

Conditional GAN

In the previous section, the fake images generated by the DCGAN are random.

There is no control over which specific digits will be produced by the generator. There

is no mechanism for how to request a particular digit from the generator. This problem

can be addressed by a variation of GAN called Conditional GAN (CGAN) [4].

Using the same GAN, a condition is imposed on both the generator and

discriminator inputs. The condition is in the form of a one-hot vector version

of the digit. This is associated with the image to produce (generator) or classified

as real or fake (discriminator). The CGAN model is shown in Figure 4.3.1.

[ 114 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!