Perfect ✅
Here’s a well-structured README.md
that introduces your project, explains why it’s useful, links to docs, and guides users on running examples.
A NumPy-only deep learning mini-framework in a single file.
deeplearn_numpy
is a minimal deep learning framework written entirely with NumPy.
It is designed to be:
- Educational — understand how neural networks work under the hood (forward pass, backward pass, gradients, optimizers).
- Lightweight — a single Python file (
deeplearn_numpy.py
) with zero dependencies beyond NumPy. - Practical — despite its simplicity, it supports configurable layers, activations, losses, optimizers, regularization, serialization, and evaluation.
This makes it a great companion for:
- Students learning the fundamentals of deep learning.
- Teachers who want to show step-by-step mechanics without hiding them in big libraries.
- Practitioners who want a lightweight sandbox to prototype and understand internals.
- Layers: Dense, Conv2D (im2col), MaxPool2D, AvgPool2D, Flatten, Dropout, BatchNorm.
- Activations: ReLU, Sigmoid, Tanh, LeakyReLU, Softmax.
- Losses: MSE, CrossEntropy (stable), BinaryCrossEntropy.
- Optimizers: SGD (momentum, Nesterov), Adam.
- Metrics: accuracy, binary accuracy, top-k accuracy.
- Regularization: L1, L2.
- Serialization: save & load weights.
- Config Builder: define models in JSON-like configs.
We provide multiple developer resources:
- document.md — Full developer guide with detailed explanations.
- reference_guide.md — API reference (methods, classes, signatures).
- cheatsheet.md — Quick syntax lookup.
- examples/ — Example projects with code and tutorials.
🔎 Start with the moons example if you want a guided walkthrough with visualization.
Clone the repo:
git clone https://github.com/yourusername/deeplearn_numpy.git
cd deeplearn_numpy
No extra dependencies required beyond NumPy and Matplotlib (for examples).
We recommend running examples from the repo root (so Python can find deeplearn_numpy.py
).
For example:
python -m examples.moon_boundry_learn.moon_boundry_learn
This runs the moon boundary learning example, where a small MLP learns to separate two crescent-shaped clusters of points.
👉 You’ll see:
- The dataset plotted.
- The initial random decision boundary.
- The trained decision boundary after learning.
.
├── cheatsheet.md # Quick syntax reference
├── deeplearn_numpy.py # Core framework (single file)
├── document.md # Full developer guide
├── examples/ # Example projects
│ └── moon_boundry_learn/ # Moons dataset classification example
│ ├── document.md
│ └── moon_boundry_learn.py
├── index.html # Project landing page
└── reference_guide.md # API reference
- Transparency: Unlike TensorFlow or PyTorch, you can open the file and read every line. No magic.
- Learning-first: Perfect for teaching neural nets in classrooms or self-study.
- Extendable: Add your own layers, losses, or optimizers by registering them.
- Real-world capable: Despite being small, it supports Conv2D, BatchNorm, Adam, etc. — so you can solve real problems on small datasets.
Contributions are welcome! If you want to add examples, new layers, or improve docs, open a pull request.
GPLv3
this repo and all files in it are created by AI (chatGPT) thus use it responsibly.