Initial commit: MLP regularization, CNN BatchNorm comparison, autoencoder denoising

This commit is contained in:
rezayaghobi-dev
2026-07-11 22:01:14 +03:30
commit e91dc7742f
22 changed files with 2457 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
# Autoencoder Image Denoising — MNIST
A simple fully-connected autoencoder trained to reconstruct clean MNIST digits from noisy versions of them.
## Architecture
```
Input(784) → Dense(32, relu) [encoder/bottleneck]
→ Dense(784, sigmoid) [decoder]
```
Gaussian noise is added to the input images; the network is trained to output the *clean* version, using binary crossentropy loss between the reconstruction and the original image.
## Approach
1. Load MNIST, normalize pixel values to [0, 1]
2. Add Gaussian noise (factor 0.5) to create noisy training inputs
3. Train the autoencoder to map noisy → clean, compressing through a 32-unit bottleneck
4. Evaluate by visually comparing original, noisy, and reconstructed images
## Result
![Denoising result](autoencoder-denoising-result.png)
Despite the bottleneck compressing each 784-pixel image down to just 32 values, the network recovers a recognizable digit — showing the encoder is learning a meaningful compressed representation rather than just copying pixels through.
## Tech stack
TensorFlow / Keras, NumPy, matplotlib
## Notebook
[`encoder-noisy-image.ipynb`](encoder-noisy-image.ipynb)