A Contrastive Learning Approach for Training Variational Autoencoder Priors