Guiding Energy-based Models via Contrastive Latent Variables