The loss function of a VAE model has two terms: the reconstruction loss L E and the Kullback-Leibler (KL) divergence L R between the learned distribution and the true distribution which we assume to be a Gaussian distribution N(0,1). We adopt the β-VAE loss which introduces a β parameter in the KL term: