An open API service indexing awesome lists of open source software.

https://github.com/ashly1991/tensorboard-mnist-tf2

Visual debugging of an MNIST MLP with low-level TensorFlow 2 using tf.data + TensorBoard (scalars, histograms, images)
https://github.com/ashly1991/tensorboard-mnist-tf2

deep-learning gradient-tape jupyter-notebook machine-learning mnist reproducibility tensorboard tensorflow tf-data visualization

Last synced: 17 days ago
JSON representation

Visual debugging of an MNIST MLP with low-level TensorFlow 2 using tf.data + TensorBoard (scalars, histograms, images)

Awesome Lists containing this project

README

          

# Let the Tensors Board — Visual Debugging for MNIST (TensorFlow 2)

This project shows how to use **TensorBoard** to visualize and debug training of a low‑level TensorFlow 2 MLP on **MNIST**, while providing data via **`tf.data`**.

## Purpose
- Build a reproducible MNIST input pipeline with `tf.data` (shuffle → batch → repeat).
- Train a minimal MLP using `tf.GradientTape` and manual updates.
- Log to TensorBoard:
- **Scalars** (loss, accuracy, gradient norms),
- **Histograms** (weights/activations),
- **Images** (sample inputs & misclassifications),
to diagnose common problems such as vanishing/exploding gradients, bad initialization, or incorrect activations.

## Run locally
```bash
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
jupyter lab let-the-tensors-board.ipynb
```
During/after training, start TensorBoard in another terminal:
```bash
./tb_start.sh
# or:
tensorboard --logdir logs --port 6006
```
Then open http://localhost:6006/

## Notes
- No raw datasets are committed. The notebook uses `tf.keras.datasets` to download MNIST at runtime.
- Logs are written to `logs/`; figures can be saved to `figures/`.
- `fails/` is provided as a placeholder directory where you can place external “failure case” scripts (not included here).