Imported from https://github.com/jihunchoi/sequential-denoising-autoencoder-tf