Quantifying Aleatoric and Epistemic Uncertainty Using Density Estimation in Latent Space