Kronyx
Built from Scratch • NumPy Powered • Educational Deep Learning Framework
A lightweight deep learning framework that makes neural networks easy to learn, inspect, visualize, and build.
Why Kronyx?
Most deep learning frameworks are designed primarily for production.
Kronyx is designed to help you understand deep learning.
Whether you're learning neural networks, teaching machine learning, prototyping new ideas, or building lightweight AI applications, Kronyx provides a familiar Keras-like API with tools that make every layer transparent.
What makes Kronyx different?
- Built entirely from NumPy
- Designed for education first
- 📈 Built-in training visualizations (
history.plot()) - Rich model inspection (
model.summary()) - Architecture visualization (
model.visualize()) - Native
.krxmodel serialization - ⚡ Lightweight with zero heavyweight ML dependencies
- Familiar Sequential API inspired by Keras
- 📦 Installable directly from PyPI
🚀 Installation
pip install kronyx
For development:
git clone https://github.com/BillyMuthiani/Kronyx.git
cd Kronyx
pip install -e ".[dev]"
For plotting support:
pip install kronyx[plotting]
For DataFrame support:
pip install kronyx[dataframe]
⚡ Quick Example
import numpy as np
from kronyx import *
X = np.array([
[0,0],
[0,1],
[1,0],
[1,1]
])
y = np.array([
[0],
[1],
[1],
[0]
])
model = Sequential()
model.add(Dense(2,16))
model.add(ReLU())
model.add(Dense(16,1))
model.add(Sigmoid())
model.compile(
loss=BinaryCrossEntropy(),
optimizer=Adam(),
metric=Accuracy()
)
history = model.fit(X,y,epochs=1000)
history.plot()
model.summary()
model.visualize()
model.save("xor.krx")
Features
| Category | Features |
|---|---|
| Core | Pure NumPy backend, Keras-like Sequential API |
| Education | Built for learning neural networks, model.summary(), model.visualize() |
| Visualization | Native SVG architecture diagrams, training curves, decision boundaries, confusion matrices |
| Visualization Engine | Layered pipeline: GraphBuilder → Layout → SceneStyler → Renderer. Themes, icons, registry-based plugins |
| Optimization | SGD, Adam |
| Losses | BinaryCrossEntropy, CategoricalCrossEntropy, SoftmaxCategoricalCrossEntropy |
| Metrics | Accuracy, BinaryAccuracy, CategoricalAccuracy, Precision, Recall, F1Score, ConfusionMatrix, TopKAccuracy |
| Callbacks | EarlyStopping, CSVLogger, ModelCheckpoint, ReduceLROnPlateau |
| Preprocessing | StandardScaler, MinMaxScaler, RobustScaler, OneHotEncoder |
| Datasets | xor, spiral, circles, moons, blobs, iris |
| Data Utilities | train_test_split, BatchLoader, TensorDataset |
| Serialization | .krx format |
| Quality | mypy type checking, Ruff linting |
| Distribution | PyPI |
🖼️ Native Visualization Engine
Kronyx includes a renderer-independent visualization engine for generating model architecture diagrams.
Pipeline
Sequential Model
↓
GraphBuilder
↓
Graph
↓
Layout Engine
↓
Scene
↓
Scene Styler
↓
Renderer
↓
SVG Output
Components
| Component | Responsibility |
|---|---|
| GraphBuilder | Inspects a Sequential model and produces an intermediate Graph |
| Graph | Immutable model structure (Nodes and Edges) |
| LayoutEngine | Computes node positions and canvas dimensions |
| LayoutRegistry | Plugin catalog for layout engines |
| SceneStyler | Applies themes, fonts, colors, and icons to produce a StyledScene |
| RendererRegistry | Plugin catalog for renderers |
| ThemeRegistry | Plugin catalog for visual themes |
| IconRegistry | Plugin catalog for layer icons |
| SvgRenderer | Paints a StyledScene into an SVG string |
Capabilities
- Native SVG rendering without Graphviz
- Vertical layout with runtime theme support
- Layer-specific semantic icons
- Registry-based plugin system for layouts, renderers, themes, and icons
- Renderer-independent architecture (SVG, PNG, PDF, HTML, ASCII)
Quick Example
from kronyx import Sequential, Dense, ReLU
model = Sequential()
model.add(Dense(2, 16))
model.add(ReLU())
model.add(Dense(16, 1))
model.visualize(output_format="svg")
This generates model_architecture.svg using the native visualization pipeline.
Documentation
| Guide | Description |
|---|---|
| Getting Started | Installation and first model |
| Sequential API | Building models |
| Layers | Dense, Conv2D, Flatten, Dropout |
| Callbacks | EarlyStopping, CSVLogger |
| Serialization | Saving and loading .krx models |
| Examples | Complete working examples |
| Roadmap | Future development |
| Changelog | Release history |
🌟 Vision
Kronyx exists to make deep learning understandable.
Instead of treating neural networks as black boxes, Kronyx exposes every layer, every parameter, and every training step through intuitive visualization and inspection tools.
Our mission is to become the best framework for learning how deep learning works under the hood.
Made with ❤️ using NumPy.
⭐ If Kronyx helps you learn or build, consider giving the repository a star.
Metadata
Release files for kronyx 1.1.1
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 |
|---|---|---|---|---|
| kronyx-1.1.1.tar.gz | 999.6 kB | With provenance | Details for kronyx-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kronyx-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for kronyx-1.1.1-py3-none-any.whl |
Total release size: 2.0 MB
Release files / kronyx-1.1.1.tar.gz
| Download URL | kronyx-1.1.1.tar.gz |
|---|---|
| Size | 999.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd7668542cf6d720030727d9718d394f3eabe6b7a0275a41b3c486c584fb4c20
|
|
BLAKE2b-256 checksum How to use checksums |
82e4260c87659c7577025f2123ba69ebc5f55f6c4afe652c90973723162482ee
|
| 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 18, 2026.
Transparency logRelease files / kronyx-1.1.1-py3-none-any.whl
| Download URL | kronyx-1.1.1-py3-none-any.whl |
|---|---|
| Size | 976.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28acea150471354e6f30d076c5b80c6a4b65820b4f2de54ae8116371c2053cbb
|
|
BLAKE2b-256 checksum How to use checksums |
5358dba1113d2c984c89d895120da175a63dfb21655a12a1d2aa7abf130185a7
|
| 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 18, 2026.
Transparency logSecurity for kronyx 1.1.1
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 kronyx-1.1.1.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 18, 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.