We can represent the joint posterior distribution of the two latent variables as 3 : Concerning the generative network, the latent variable at the bottom is sampled conditioned on the one at the top.
we have: , the second term of the VAE objective, then becomes the KL divergence between joint posterior and prior distributions of the two latent variables.