Training Latent Variable Models with Auto-encoding Variational Bayes: A Tutorial