A neural network library built from scratch using only Python & NumPy
CSE473s · Computational Intelligence · Spring 2026
neurofashion/
├── lib/
│ ├── __init__.py
│ ├── layers.py # Base Layer + Dense
│ ├── activations.py # ReLU, Sigmoid, Tanh, Softmax
│ ├── losses.py # MSE, BinaryCrossEntropy
│ ├── optimizer.py # SGD with Momentum
│ ├── network.py # Sequential model
│ └── utils.py # Gradient checker + helpers
├── notebooks/
│ └── project_demo.ipynb
└── report/
└── project_report.pdf
pip install numpy matplotlib scikit-learn tensorflow
cd notebooks
jupyter notebook project_demo.ipynb| Section | Description |
|---|---|
| 1 | Gradient Checking — proves backprop correct |
| 2 | XOR Problem — 100% accuracy |
| 3 | Denoising Autoencoder on Fashion-MNIST |
| 4 | Latent Space SVM Classification |
| 5 | TensorFlow/Keras Comparison |
from lib.layers import Dense
from lib.activations import ReLU, Sigmoid
from lib.losses import MSE
from lib.optimizer import SGD
from lib.network import Sequential
model = Sequential()
model.add(Dense(2, 4, weight_init='glorot'))
model.add(ReLU())
model.add(Dense(4, 1))
model.add(Sigmoid())
model.compile(optimizer=SGD(0.01, momentum=0.9), loss=MSE())
model.train(X, y, epochs=1000, batch_size=32)- numpy
- matplotlib
- scikit-learn
- tensorflow (data loading + Keras comparison only)
NeuroFashion Team · MCT Program · Ain Shams University