Visualize PyTorch weights in 1D, 2D & 3D — instantly!
A 2-file, zero-install web dashboard to explore .pth / .pt models.
No training, no setup — just drop in your model and see every layer in colorful, interactive 3D.
---
| Feature | Description |
|---|---|
| 3D Point Cloud | Red = low values, Blue = high values, Size scales with magnitude |
| 2D Heatmap | Full-resolution layer view (auto-scaled) |
| 1D Line Chart | Raw weight values (sampled) |
| Histogram | Distribution of values per layer |
| Smart Indicators | Overfit, dead weights, extreme values |
| Dark Mode UI | Clean, collapsible panels |
# 1. Clone & enter
git clone https://github.com/jdwebprogrammer/torch-model-viewer.git
cd torch-model-dashboard
# 2. Install (once)
pip install flask torch pillow numpy
# 3. Run!
python app.pyOpen http://127.0.0.1:5000 → Upload your .pth or .pt file → Explore!
- Backend (
app.py): Loads model → extracts weights → computes stats, heatmaps, 3D layouts - Frontend (
templates/index.html): Three.js + Chart.js → interactive 3D orbit + responsive UI - Smart Sampling: Up to 10,000 points per layer → smooth performance even on huge models
- Spot dead neurons (all red, tiny)
- Find exploding gradients (huge blue points)
- Compare layer patterns across models
- Debug quantization, pruning, or training bugs
torch-model-dashboard/
├── app.py Flask + Torch backend
├── templates/
│ └── index.html Three.js + Chart.js frontend
└── README.md
MIT — Free to use, modify, and share.
> Made with **love** for the PyTorch community
> *“See your weights. Understand your model.”*