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.

Chapter 4

Figure 4.3.4: The fake images generated by CGAN at different training steps when

conditioned with labels [0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5]

You're encouraged to run the trained generator model to see new synthesized

MNIST digits images:

python3 cgan-mnist-4.3.1.py --generator=cgan_mnist.h5

Alternatively, a specific digit (for example, 8) to be generated can also be requested:

cgan-mnist-4.3.1.py --generator=cgan_mnist.h5 --digit=8

With CGAN it's like having an agent that we can ask to draw digits similar

to how humans write digits. The key advantage of CGAN over DCGAN is that

we can specify which digit we want the agent to draw.

[ 123 ]

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

Saved successfully!

Ooh no, something went wrong!