1.1 KiB
Autoencoder Image Denoising — MNIST
Setup
A minimal fully-connected autoencoder: Input(784) → Dense(32, relu) → Dense(784, sigmoid). Gaussian noise (factor 0.5) is added to MNIST digits, and the network is trained to reconstruct the original clean image from the noisy input — binary crossentropy loss between reconstruction and ground truth.
Why a 32-unit bottleneck matters
Compressing a 784-pixel image down to 32 values and then reconstructing it forces the network to learn which features actually matter for representing a digit, rather than memorizing pixels. If the reconstruction still looks like a recognizable digit after that bottleneck, it's evidence the encoder learned a genuinely useful compressed representation.
Result
Despite the aggressive compression (784 → 32 → 784), the reconstructions are clearly recognizable digits — the noise is substantially removed and the core digit shape is preserved.
