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

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

Built distribution (wheel)

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

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

Download URL euclid_ml-0.9.1.4-py3-none-any.whl
Size 27.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92af5ee3ab6c446aefd110e25ad0edd5d36b2239dd00888b9341e9795c12f440
BLAKE2b-256 checksum
How to use checksums
a2f3f69673caf9fc4318506be85e9096727d2fddab900d965663c0a10acfba69
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.4

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