16.03.2021 Views

Advanced Deep Learning with Keras

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 8

Figure 8.2.6: Digits 6 to 9 generated as a function of latent vector mean values and one-hot label

(CVAE CNN). For ease of interpretation, the range of values for the mean is similar to Figure 8.2.4.

In Figure 8.2.4, the distribution of mean per label is shown after 30 epochs. Unlike in

both Figures 8.1.6 and 8.1.11 in the previous sections, each label is not concentrated

on a region but distributed across the plot. This is expected since every sampling

in the latent space should generate a specific digit. Navigating the latent space

changes the attribute of that specific digit. For example, if the digit specified is 0,

then navigating the latent space will still produce a 0 but the attributes, such as tilt

angle, thickness, and other writing style aspects will be different.

These changes are more clearly shown in Figures 8.2.5 and 8.2.6. For ease of

comparison, the range of values for the latent vector is the same as in Figure 8.2.4.

Using the pretrained weights, a digit (for example, 0) can be generated by executing

the command:

$ python3 cvae-cnn-mnist-8.2.1.py --weights=cvae_cnn_mnist.h5 --digit=0

[ 263 ]

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

Saved successfully!

Ooh no, something went wrong!