Skip to main content

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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for euclid-ml 0.9.1.2
File Size Uploaded Provenance
euclid_ml-0.9.1.2.tar.gz 16.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for euclid-ml 0.9.1.2
File Interpreter ABI Platform
euclid_ml-0.9.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 41.0 kB

Release files / euclid_ml-0.9.1.2.tar.gz

Download URL euclid_ml-0.9.1.2.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3c3edaa076ef63620510cde8c2347d783fcde0e41982187f33a908b3d87570a9
BLAKE2b-256 checksum
How to use checksums
4b08366088dc375bb9dcf983d48a5a184fb9380baa129bff1f35d372254e3bcd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / euclid_ml-0.9.1.2-py3-none-any.whl

Download URL euclid_ml-0.9.1.2-py3-none-any.whl
Size 24.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc449cedfd7af902c828c931736ec9e7bc71af4bf234cdd8fad92d64b42eb111
BLAKE2b-256 checksum
How to use checksums
738b70f1163b33fc0ea58630fcb55bf7c790c1e5f577b20683f20c7aec20ac44
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.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page