Imported from https://github.com/ryokamoi/hybrid_textvae