Prepare a dataset
Use a standard image dataset (MNIST, Fashion-MNIST or CIFAR-10) and normalise values to the model's expected range; split into train/validation sets.
Train a variational autoencoder. Inspect its generative output.
A variational autoencoder (VAE) learns a continuous latent space that can generate new samples by combining a probabilistic encoder and decoder trained with an ELBO objective. Typical weaknesses include blurry reconstructions, posterior collapse, sensitivity to architecture and optimisation settings, and the need for datasets large enough to learn meaningful latent factors.
Learning concept · Not a validated service
A variational autoencoder (VAE) learns a continuous latent space that can generate new samples by combining a probabilistic encoder and decoder trained with an ELBO objective. Typical weaknesses include blurry reconstructions, posterior collapse, sensitivity to architecture and optimisation settings, and the need for datasets large enough to learn meaningful latent factors.
A proposed extension: use a small VAE to produce reconstructions and latent-space visualisations for education or dataset exploration. This extension is not implemented by the supplied starter.
Use a standard image dataset (MNIST, Fashion-MNIST or CIFAR-10) and normalise values to the model's expected range; split into train/validation sets.
Implement an encoder that maps inputs to latent mean and log-variance, and a decoder that reconstructs inputs from sampled latents; choose appropriate convolutional or MLP layers.
Optimise reconstruction loss plus KL divergence (the ELBO); monitor reconstruction loss, KL term and validation reconstructions to detect posterior collapse.
Compute reconstruction metrics and sample from the prior for latent traversals; for images, report FID and inspect samples qualitatively.
The supplied starter does not implement a VAE. It defines five 3‑dimensional seed examples, computes their centroid and covariance, then draws five multivariate normal samples, clips them to [0,1] and prints them. There is no encoder, decoder, ELBO, optimisation loop or dataset handling.
centroid = seed_examples.mean(axis=0)
covariance = np.cov(seed_examples.T) + np.eye(seed_examples.shape[1]) * 0.01
synthetic_samples = rng.multivariate_normal(centroid, covariance, size=5)
synthetic_samples = np.clip(synthetic_samples, 0, 1)The starter performs multivariate Gaussian sampling from summary statistics of five seed vectors. It contains no encoder/decoder networks, no training loop, and no VAE loss (ELBO), so it cannot demonstrate VAE training or generation beyond simple Gaussian draws.
A proposed project extension: train a small convolutional VAE on MNIST or CIFAR-10, produce reconstruction examples, sample from the prior to generate images, and add a latent‑traversal visualiser for inspection and debugging.
This is a potential application pathway, not a delivered product. The supplied starter does not implement this service or validate it with real users.
Networkers Home runs this topic inside its AI Engineer Course, with placement support and hands-on labs.