NaNsense
See what your neural network is doing while it trains.
https://github.com/user-attachments/assets/b15f7dc5-1a6f-44d2-81fa-a97daafa89c6
Follow a channel through training, see what it responds to, and trace how one changed pixel moves through the network.
Click a layer to inspect its activations and gradients. Step through batches, revisit earlier epochs, or edit the input and see what changes.
- 🕹️ Try the Playground — explore a trained network in your browser
- ✨ Integrate with one prompt — let a coding agent add NaNsense to your training loop
- 🤖 Debug with a coding agent — let an agent inspect the same run with
nansense-cli - 📚 Documentation — guides, examples, and the Python API
NaNsense is a visual debugger for PyTorch. Pause training, step through batches, revisit earlier epochs, and inspect activations, gradients, weights, and optimizer state.
- Understand learned features. See activations and gradients, find the inputs that excite a channel, and use deep dream to reveal what it has learned.
- Find training problems. Spot dead channels, padding artifacts, small receptive fields, and gradient underflow.
Experiment trackers show that a run went wrong. NaNsense helps you find where it went wrong inside the network—for example, a layer with dead channels or underflowing gradients.
Try it
Clone the repository and run the standard example with uv. The first run may take a few minutes while it downloads Python, packages, and data.
# Install uv (Windows: https://docs.astral.sh/uv/getting-started/installation):
curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/kongaskristjan/nansense
cd nansense
uv run --group cpu examples/standard/main.py --nansense-port 8080
Getting started lists all the examples and explains the hardware groups.
Use it in your project
pip install nansense
Paste this prompt into your coding agent, or follow the Wiring guide.
See INTERNALS.md for the architecture.
Metadata
Release files for nansense 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nansense-0.4.0.tar.gz | 3.5 MB | With provenance | Details for nansense-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nansense-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for nansense-0.4.0-py3-none-any.whl |
Total release size: 3.9 MB
Release files / nansense-0.4.0.tar.gz
| Download URL | nansense-0.4.0.tar.gz |
|---|---|
| Size | 3.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2736c192e5b173c17a9d7e929ff0d47077cee19a47b89efc1ef3fc29f7db2ccd
|
|
BLAKE2b-256 checksum How to use checksums |
8a316590e976769aa28a0b1d42b8d6757b8b9f0b19206e41990a90019502a40b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency logRelease files / nansense-0.4.0-py3-none-any.whl
| Download URL | nansense-0.4.0-py3-none-any.whl |
|---|---|
| Size | 414.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a10eb4304a55596a758c54886e55dab90370d8b2fd05cf0f592c80cb0268ccb5
|
|
BLAKE2b-256 checksum How to use checksums |
ffb8fb2b56ac4bd22d3b00efc4a02e13c50e0b9540128152456039fcc7995064
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency logSecurity for nansense 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for nansense-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.