Variational Autoencoder (VAE) is a type of Generative Model that uses a neural network to learn a probabilistic representation of the input data. It consists of an encoder and a decoder, where the encoder maps the input data to a latent space, and the decoder maps the latent space back to the input data. The VAE is trained by maximizing the evidence lower bound (ELBO) of the log-likelihood of the input data. Your task is to implement the VAE algorithm.
**Example:** Suppose we have a dataset of images, and we want to use the VAE to learn a probabilistic representation of the images.
**Constraints:** The dataset consists of 1000 images, each with a size of 28x28 pixels.
**Note:** This problem requires a good understanding of Generative Models and the VAE algorithm.
Test Cases
[np.array([[1, 2, 3], [4, 5, 6]], dtype=np.float32)]None[np.array([[7, 8, 9], [10, 11, 12]], dtype=np.float32)]None