VAE is trained to reduce following two losses.
KL divergence between inferred latent distribution and Gaussian.
the reconstruction loss
I understand that first one regularize VAE to get structured latent space.
My question is, why and how does the second loss help VAE to work?
During training of the VAE, we first feed an image to the encoder.
Then, the encoder infer mean and variance.
After that we re-sample z from the inferred distribution.
Finally generator(decoder) gets re-sampled z and generates image.
(And VAE is trained to make the generated image to be equal with original input image.)
Here, I cannot understand why the re-sampled z should makes original image.
Since the z is re-sampled one, it seems that the z does not have any relationship between original image.
But, as you know, VAE works well.. so I think I miss something important or understand it in totally wrong way.
Kind explanation will be greatly appreciated. Thanks.