Imported from https://github.com/Chung-I/Variational-Recurrent-Autoencoder-Tensorflow