https://github.com/alonmell/modulnet
Lightweight NumPy-based neural network framework with core layers, loss functions, optimizers, and data utilities
https://github.com/alonmell/modulnet
deep-learning from-scratch machine-learning neural-network numpy
Last synced: about 2 months ago
JSON representation
Lightweight NumPy-based neural network framework with core layers, loss functions, optimizers, and data utilities
- Host: GitHub
- URL: https://github.com/alonmell/modulnet
- Owner: AlonMell
- License: mit
- Created: 2025-05-07T16:58:27.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-07T17:16:51.000Z (about 1 year ago)
- Last Synced: 2025-05-31T23:22:16.152Z (about 1 year ago)
- Topics: deep-learning, from-scratch, machine-learning, neural-network, numpy
- Language: Jupyter Notebook
- Homepage:
- Size: 3.99 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ModulNet
A lightweight neural network framework written from scratch in NumPy.
Includes core building blocks for fully-connected and convolutional networks, custom optimizers, loss functions, and data loading utilities.
## Explanation

## Features
- Module API with `forward`/`backward` methods
- Layers: `Linear`, `Conv2D`, `MaxPool2D`, `Flatten`, `ReLU`, `Sigmoid`, `DropOut`
- Loss: `CrossEntropy` with softmax
- Optimizers: `SGD`, `Adagrad`, `RMSProp`, `Adam`
- Regularization utilities: `L1`, `L2`, `ElasticNet`
- Simple `DataLoader` for batching
- Example ConvNet training on MNIST in `main.py`
- Jupyter notebooks for experimentation
- Ruff, pytest integration for linting, formatting, and testing
## Installation
```bash
git clone https://github.com/AlonMell/ModulNet.git module_net
cd module_net
pip install -r requirements.txt
```
## Usage
Train the example convolutional network on MNIST:
```bash
python main.py
```
Or explore the ModuleNet implementation in `notebooks/module.ipynb`.
## Development
- Lint: `make lint`
- Format: `make fmt`
- Run tests: `make test` or `pytest`
## License
This project is licensed under the MIT License. See [LICENSE](LICENSE).