neurz
See RNN, LSTM, GRU and CNN work, one operation at a time.
neurz is an educational desktop app that runs small neural networks with real NumPy arithmetic, records every operation and lets you play, pause, step and scrub through them like a video. Every number on screen is the number the network actually computed; every box, gate, wire and matrix can be clicked for an explanation in plain language, in detail or as a formula.
What you can watch
| Model | Task | What is animated |
|---|---|---|
| RNN | reads n e u r and predicts the next letter (e u r z) |
the network unrolled in time: input, W_xh·x, W_hh·h, sum + bias, tanh, softmax |
| LSTM | same task | forget / input / output gates, candidate memory, the cell-state highway, f ⊙ c + i ⊙ c̃, o ⊙ tanh(c) |
| GRU | same task | reset and update gates, r ⊙ h, the candidate, the (1 − z)·h + z·h̃ mix |
| CNN | is this 8×8 picture a vertical bar, a horizontal bar or a plus? | the 3×3 window sliding over the image, x ⊙ K and its sum, feature maps filling cell by cell, ReLU, max-pooling with the chosen maximum marked, flatten, dense, softmax |
- Playback: play / pause, step forward and back, jump to start or end, loop, speed 0.25×–8×, a timeline grouped by time step that you can click or drag.
- Click to learn: clicking any element opens a short bubble next to it; the panel on the right explains it at three levels (Simple · Detailed · Math) with links to related concepts.
- "Now" card: what the current step does, the operation with its own numbers, and whether the guess was right.
- Trained vs. random weights: switch to an untrained network (any seed) and watch the predictions and the loss fall apart.
- Turkish and English interface, Night and Paper themes, keyboard shortcuts, settings remembered between runs.
Install
The desktop app (Python, PyPI):
pip install neurz
neurz # or: nz
Python 3.10+ with PySide6 and NumPy; runs on Windows, Linux and macOS.
The same runs, step by step in the terminal or in your own code, without the window:
npm install -g neurz # JavaScript (npm)
neurz run lstm
cargo install neurz # Rust (crates.io)
neurz run cnn --sample plus
import { run } from "neurz";
const r = run("gru"); // r.steps: [{ phase, t, formula }], r.guesses, r.loss
let r = neurz::run("lstm", "").unwrap(); // r.steps, r.guesses, r.loss
All three packages are called neurz and share the same trained weights;
neurz gui in the npm and Rust versions opens the Python desktop app if it is installed.
Command line
nz -V # version
nz models # list the models
nz run lstm # print every step with its numbers
nz run rnn --random --seed 3 # the same with untrained weights
nz run cnn --sample vertical
nz concepts # every concept key
nz explain forget_gate --level math
nz update # upgrade with this Python's pip
Keyboard
| Key | Action |
|---|---|
| Space | play / pause |
| → / ← | step forward / back |
| Home / End | start / end |
| + / − | faster / slower |
| L | loop |
| 1 2 3 4 | RNN · LSTM · GRU · CNN |
| F1 F2 F3 | Simple · Detailed · Math explanation |
How it works
neurz.core has no Qt in it. Each model runs once (core/models.py) and writes every
operation down as a frame: which elements are active, along which wires the data moves,
every vector known so far and the formula with its numbers. The GUI player only moves
through these frames, so stepping back never recomputes anything. The trained weights
in core/weights.json come from tools/train_weights.py, which trains the tiny
networks with plain finite-difference gradients, no deep-learning library needed.
Development
git clone https://github.com/bayramkotan/neurz
cd neurz
pip install -e .[dev]
pytest # Python
npm test # JavaScript (js/)
cargo test # Rust (rust/)
Pushing a vX.Y.Z tag runs .github/workflows/release.yml: the tests of all three
languages, then PyPI, npm and crates.io in one run (secrets: PYPI_API_TOKEN,
NPM_TOKEN, CARGO_REGISTRY_TOKEN).
License
MIT. Bundled fonts: Inter and JetBrains Mono (SIL Open Font License 1.1).
Metadata
Release files for neurz 0.0.2
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 |
|---|---|---|---|---|
| neurz-0.0.2.tar.gz | 1.1 MB | Without provenance | Details for neurz-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| neurz-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for neurz-0.0.2-py3-none-any.whl |
Total release size: 2.3 MB
Release files / neurz-0.0.2.tar.gz
| Download URL | neurz-0.0.2.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc70c9671f1479542c24da3ff3fbccdf3d55ca782d8d6271a1313689ec59863d
|
|
BLAKE2b-256 checksum How to use checksums |
9239cf9724c719b92344eeeba27f02b5842d83e45bf86bf9a614f677f081bc0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / neurz-0.0.2-py3-none-any.whl
| Download URL | neurz-0.0.2-py3-none-any.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80c52ffa682561b799191d4c42bba6086301337d9506fa9ade90246a859df9b5
|
|
BLAKE2b-256 checksum How to use checksums |
628733f1b2a377cbf33ce9d3d8e422957b81c702fe8d89f4b701611c1e4c615a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for neurz 0.0.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.