Confused on Variational AutoEncoder I'm a bit confused on how Variational Autoencoders are trained. In particular I'm confused on how the latent variable is generated for each input. 

My questions are as follows:


When running stochastic gradient descent does the sampled latent variable stick with the data point during the entire run or does a new latent variable get sampled each time descent is run? 
If running batch or full gradient descent, each data point gets its own set of sampled latent variables right? 
How do you check for convergence? Assuming the latent variable is sampled at each iteration, it's not clear to me how you can evaluate if you have converged or not given the stochastic nature of the performance function.
VAE's have an encoder.  The encoder maps an input to a latent vector. The latent vector doesn't "stick".  Instead, in each iteration, we use the encoder to map to a latent distribution, sample from that latent distribution, then use the decoder to map to a reconstruction, and compute the loss.  Yes, each data point is mapped to its own latent vector.  Yes, you run the encoder anew and sample anew for each point and each iteration of training.

You check for convergence in the standard way for any neural network: you look for the value of the loss function to plateau.