PyTorch VAE (Variational Autoencoder) example not training (no meaningful model returned)

You can try this version. It trains OK and can generate images by vae.sample(). However, you might want to play with the learning rate.