Skip to main content

A lightweight deep learning framework built from scratch using NumPy

Project description

Kronyx

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.

PyPI Python License Tests Documentation


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 .krx model 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kronyx-1.1.0.tar.gz (43.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kronyx-1.1.0-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

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

Hashes for kronyx-1.1.0.tar.gz
Algorithm Hash digest
SHA256 80b6dfc9492184b9f731679f125d17c500992e90c39d9fd5511961a282019cae
MD5 72dafd57a2ceaecbe47ff3c8252da1b8
BLAKE2b-256 e1f766323d1424574e4420c0266a479cd3bce9cea92ff95ec3af63430243fb3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for kronyx-1.1.0.tar.gz:

Publisher: publish.yml on BillyMuthiani/Kronyx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for kronyx-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dae7575d4ee495c9890bcbd070cd8be436f79cf8be75dadd636dd8ca9e981914
MD5 8679953675e7932cb36e58eae233f04b
BLAKE2b-256 ac3ab2203464af9bb509abade95c39048a2f6b4e2e658346f4c7c0fb83db85a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for kronyx-1.1.0-py3-none-any.whl:

Publisher: publish.yml on BillyMuthiani/Kronyx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page