Euclid
Euclid is a lightweight, educational deep learning framework built from the ground up using only NumPy or CuPy. Its goal is to provide an intuitive, easy-to-use API while exposing the inner workings of modern neural networks.
Unlike large machine learning frameworks, Euclid is designed to be understandable, extensible, and easy to experiment with.
Features
- Automatic differentiation (Autograd)
- CPU (NumPy) and GPU (CuPy) backends
- Sequential model API
- Common neural network layers
- Dense
- Conv2D
- MaxPool2D
- Flatten
- Dropout
- Activation functions
- ReLU
- Sigmoid
- Tanh
- Softmax
- Loss functions
- Cross Entropy
- Mean Squared Error (MSE)
- Huber Loss
- Optimizers
- SGD
- RMSProp
- Adam
- Built entirely in Python using only NumPy/CuPy
Philosophy
Euclid aims to bridge the gap between educational neural network implementations and production machine learning libraries.
The project focuses on:
- Readable source code
- Minimal dependencies
- Performance where possible
- Learning how deep learning frameworks work internally
Whether you're interested in understanding backpropagation, building custom layers, or experimenting with new neural network architectures, Euclid provides a simple and easily editable foundation.
Installation
pip install euclid-ml
Example
import euclid as Euclid
model = Euclid.Sequential([
Euclid.Dense(784, 128),
Euclid.ReLU(),
Euclid.Dense(128, 10),
Euclid.Softmax(),
])
optimizer = Euclid.Adam(
model.parameters(),
learning_rate=1e-3
)
loss = Euclid.CrossEntropy()
GPU Support
Euclid can run on either CPU or GPU depending on your configuration.
- CPU: NumPy
- GPU: CuPy
Simply configure the desired backend and the same code runs on either device.
Why Euclid?
Euclid was created to answer a simple question:
How do modern deep learning frameworks actually work under the hood?
Instead of hiding implementation details behind millions of lines of optimized C++ and CUDA, Euclid implements everything in Python using NumPy and CuPy, making it easy to explore, modify, and extend.
Roadmap
- Automatic differentiation
- Dense layers
- Convolutional neural networks
- GPU backend
- Optimizers
- Recurrent neural networks
- Transformers
- Mixed precision training
- Model serialization
- Distributed training
Contributing
Contributions, bug reports, feature requests, and discussions are welcome.
If you'd like to contribute, feel free to open an issue or submit a pull request.
License
This project is licensed under the MIT License.
Metadata
Release files for euclid-ml 0.9.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| euclid_ml-0.9.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Release files / euclid_ml-0.9.1.3-py3-none-any.whl
| Download URL | euclid_ml-0.9.1.3-py3-none-any.whl |
|---|---|
| Size | 27.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73d66a27411b1f31416e6ffabf2360bc66bc4bf19d229af5a3484ceb251ad5a5
|
|
BLAKE2b-256 checksum How to use checksums |
19fcc7c903d95ef6ae9a167054ad416cf7d7e5252bf64a262db03f20a280890e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for euclid-ml 0.9.1.3
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.