lossscape is an interactive gradient descent visualizer that demonstrates optimization failure modes, learning rate sensitivity, and loss landscapes in real time. Perfect for machine learning learners to explore optimization behavior on pathological surfaces.
- Learn by visualizing: Instantly see how gradient descent behaves under different learning rates, saddle points, and exploding/vanishing gradients.
- Multiple optimizers: Toggle between SGD, Momentum, and Adam-lite.
- Animated loss surfaces: 2D landscapes with live GD trajectories.
- Recruiter-friendly: Demonstrates strong ML intuition, coding ability, and visualization skills.
LossScape/
├── src/
│ └── lossscape/
│ ├── __init__.py
│ ├── app.py
│ ├── config.py
│ ├── optimizers.py
│ ├── surfaces.py
│ ├── visualizers.py
├── tests/
│ ├── test_optimizers.py
│ └── test_surfaces.py
├── pyproject.toml
├── requirements.txt
├── README.md
└── .gitignore
- Language: Python 3.11
- Libraries: NumPy, Matplotlib
- Testing: Pytest
- Visualization: Animated GD trajectories on 2D loss surfaces
Clone and launch the development server:
git clone https://github.com/0xSris/lossscape.git
cd lossscape
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txtRun the App:
python -m src.lossscape.appAccess the app at http://localhost:5173.
Visualizing Loss Landscapes
- Launch the app to open a live interactive window.
- Choose a loss surface from the available options.
- Toggle between optimizers: SGD, Momentum, Adam-lite.
- Adjust learning rates to observe sensitivity and failure modes.
- Watch gradient descent trajectories animate in real time.
Learning Objectives
- Observe pathological loss surfaces.
- Understand saddle points, exploding/vanishing gradients, and learning rate effects.
- Compare optimizer behavior visually.
- Issues: issues
- Documentation: See the docs folder (if available).
- Contributing: See docs/CONTRIBUTING.md
Maintained by @0xSris and contributors.
We welcome PRs and issues! Please review docs/CONTRIBUTING.md for the guidelines.
## 🤩 Why This Stands Out
- Professional ML visualization: Shows complex optimization concepts clearly.
- Interactive & shareable: Can be used to demonstrate ML intuition in presentations or interviews.
- Portfolio-ready: Demonstrates coding, testing, and visualization skills in one project.