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

The solution to this problem is to push out the Sampling process as the input

as shown on the right side of Figure 8.1.1. Then, compute the sample as:

Sample = µ + ∈ σ (Equation 8.1.13)

If ∈ and σ are expressed in vector format, then ∈ σ is element-wise multiplication.

Using Equation 8.1.13, it appears as if sampling is directly coming from the

latent space as originally intended. This technique is better known as the

Reparameterization Trick.

With Sampling now happening at the input, the VAE network can be trained

using the familiar optimization algorithms such as SGD, Adam, or RMSProp.

Decoder testing

After training the VAE network, the inference model including the addition and

multiplication operator can be discarded. To generate new meaningful outputs,

samples are taken from the Gaussian distribution used in generating ∈ . Following

figure shows us how to test the decoder:

Figure 8.1.2: Decoder testing setup

[ 243 ]

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

Saved successfully!

Ooh no, something went wrong!