A small, extensible, and lightweight framework for building powerful neural networks in Python, built on mygrad.
HelixNet is designed to be a transparent and easy-to-understand tool for learning and experimentation. It is powerful enough to run complex models like CNNs and LSTMs, but simple enough to run efficiently on modest hardware.
Key Features
- Lightweight & Simple: No complex compilation or heavy dependencies. Just plug and play.
- Extensible by Design: A clean, object-oriented structure (
Layer,Optimiser) makes it easy to create your own custom layers and optimizers. - Modern Architecture: Includes common layers like
Dense,Conv2D,MaxPooling2D,LSTM, andEmbedding. - Powerful Optimizers: Comes with robust implementations of
SGD(with momentum),RMSPropandAdam. - Full Documentation: Comprehensive documentation available here.
Installation
# For the latest stable version
pip install HelixNet
# For development (editable) mode
pip install -e .
Quickstart: Training a Model
Here's a quick example of how to build and train a model on the classic "spiral" dataset.
import numpy as np
import mygrad as mg
import helixnet.layers as layers
import helixnet.optimisers as optimisers
import helixnet.activations as activations
import helixnet.models as models
from nnfs.datasets import spiral_data
# Create dataset
X, y = spiral_data(samples=100, classes=3)
X = mg.tensor(X)
y = mg.tensor(y, dtype=int)
# Build model
model = models.Sequental([
layers.Dense(2, 64, activation=activations.ReLU),
layers.Dense(64, 3, activation=(lambda x: x)) # Logits
])
optim = optimisers.Adam(learning_rate=0.05, decay=5e-7)
# Train the model
for epoch in range(10001):
logits = model.forward(X)
loss = mg.nnet.losses.softmax_crossentropy(logits, y)
loss.backward()
optim.optimise(model)
model.null_grads()
if epoch % 100 == 0:
accuracy = np.mean(np.argmax(logits.data, axis=1) == y.data)
print(f'Epoch: {epoch}, Loss: {loss.data:.4f}, Accuracy: {accuracy:.4f}')
Documentation
For a full guide to all layers, optimizers, and functionalities, please see the Full HelixNet Documentation.
Contributing
Contributions are welcome! If you find a bug or have a feature request, please open an issue. If you'd like to contribute code, please see the notes on our own contributions to mygrad (#445) for an example of our development philosophy.
Metadata
Release files for HelixNet 0.7.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 | |
|---|---|---|---|
| helixnet-0.7.0.tar.gz | 19.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| helixnet-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.2 kB
Release files / helixnet-0.7.0.tar.gz
| Download URL | helixnet-0.7.0.tar.gz |
|---|---|
| Size | 19.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12e53001a414559f2e9f136038e2aea5b375e46ae05f2ce8bb8f442dbb4b3fe8
|
|
BLAKE2b-256 checksum How to use checksums |
0891060b7693fce4387a6b99e567aec340fdf5760c387801fc242a5ab4fa0ed3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 Jul 22, 2025.
Transparency logRelease files / helixnet-0.7.0-py3-none-any.whl
| Download URL | helixnet-0.7.0-py3-none-any.whl |
|---|---|
| Size | 22.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7639cd201e2ffe64b7fd056fbfefd11f46c7994cc6be7be1dce42c9dd415e69f
|
|
BLAKE2b-256 checksum How to use checksums |
49852d832649e54941fa4a6f03cc3a33b732e2d464cdddfd0f58ccea40412686
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 Jul 22, 2025.
Transparency log