From Chapter 4, Deep Learning for IOT, you should be familiar with autoencoders and their functions. VAEs are a type of autoencoder; here, we retain the (trained) Decoder part, which can be used by feeding random latent features z to generate data similar to the training data. Now, if you remember, in autoencoders, the Encoder results in the generation of low-dimensional features, z:
![](https://static.packt-cdn.com/products/9781788836067/graphics/assets/dd786420-2201-4898-975f-21491a2ed0b9.png)
The VAEs are concerned with finding the likelihood function p(x) from the latent features z:
![](https://static.packt-cdn.com/products/9781788836067/graphics/assets/74b8ddce-feed-42ca-93ee-c4dcb085498b.png)
This is an intractable density function, and it isn't possible to directly optimize it; instead, we obtain a lower bound by using a simple Gaussian prior p(z) and making both Encoder and Decoder networks probabilistic:
![](https://static.packt-cdn.com/products/9781788836067/graphics/assets/7cd997c5-acba-4732-9b5b-bb83ca6d0bab.png)
This allows us to define a tractable lower bound on the log likelihood, given by the following:
...