A lightweight deep learning framework built from scratch using NumPy
Project description
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 | history.plot(), plot_decision_boundary(), plot_confusion_matrix(), plot_dataset(), plot_predictions(), plot_feature_space() |
| 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 |
📚 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kronyx-1.1.0.tar.gz.
File metadata
- Download URL: kronyx-1.1.0.tar.gz
- Upload date:
- Size: 43.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80b6dfc9492184b9f731679f125d17c500992e90c39d9fd5511961a282019cae
|
|
| MD5 |
72dafd57a2ceaecbe47ff3c8252da1b8
|
|
| BLAKE2b-256 |
e1f766323d1424574e4420c0266a479cd3bce9cea92ff95ec3af63430243fb3e
|
Provenance
The following attestation bundles were made for kronyx-1.1.0.tar.gz:
Publisher:
publish.yml on BillyMuthiani/Kronyx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kronyx-1.1.0.tar.gz -
Subject digest:
80b6dfc9492184b9f731679f125d17c500992e90c39d9fd5511961a282019cae - Sigstore transparency entry: 2117309466
- Sigstore integration time:
-
Permalink:
BillyMuthiani/Kronyx@834109b24e29496071625472ed07d4ea55237272 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/BillyMuthiani
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@834109b24e29496071625472ed07d4ea55237272 -
Trigger Event:
release
-
Statement type:
File details
Details for the file kronyx-1.1.0-py3-none-any.whl.
File metadata
- Download URL: kronyx-1.1.0-py3-none-any.whl
- Upload date:
- Size: 38.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dae7575d4ee495c9890bcbd070cd8be436f79cf8be75dadd636dd8ca9e981914
|
|
| MD5 |
8679953675e7932cb36e58eae233f04b
|
|
| BLAKE2b-256 |
ac3ab2203464af9bb509abade95c39048a2f6b4e2e658346f4c7c0fb83db85a1
|
Provenance
The following attestation bundles were made for kronyx-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on BillyMuthiani/Kronyx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kronyx-1.1.0-py3-none-any.whl -
Subject digest:
dae7575d4ee495c9890bcbd070cd8be436f79cf8be75dadd636dd8ca9e981914 - Sigstore transparency entry: 2117309499
- Sigstore integration time:
-
Permalink:
BillyMuthiani/Kronyx@834109b24e29496071625472ed07d4ea55237272 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/BillyMuthiani
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@834109b24e29496071625472ed07d4ea55237272 -
Trigger Event:
release
-
Statement type: