This project was built while learning neural networks from scratch in December 2025. Instead of only studying theory, each concept was implemented step-by-step using NumPy to gain a deeper understanding of how neural networks actually work internally.
The repository was initially created as a placeholder and has now been properly structured to reflect the complete learning and implementation journey.
-
Manual forward propagation
-
Batch processing using NumPy
-
Dense (Fully Connected) layer implementation
-
Activation functions:
- ReLU
- Softmax
-
Loss function:
- Categorical Cross Entropy (CCE)
-
Multi-layer neural network pipeline
-
Comparison with TensorFlow implementation
NN-from-Scratch/
│
├── src/
│ ├── layers/
│ │ └── dense.py
│ ├── activations/
│ │ ├── relu.py
│ │ └── softmax.py
│ ├── losses/
│ │ └── cce.py
│
├── examples/
│ ├── full_pipeline.py
│ └── tensorflow_compare.py
│
├── experiments/
│ ├── initial_nn.py
│ └── batching_raw.py
│
├── notebooks/
│ └── nn.ipynb
│
├── requirements.txt
└── README.md
- Python
- NumPy → core computations and vectorization
- TensorFlow / Keras → used for comparison with real-world implementation
pip install -r requirements.txt
python examples/full_pipeline.py
- Implemented neural network components without using ML frameworks
- Understood how matrix multiplication drives forward propagation
- Explored numerical stability in Softmax (max-shift trick)
- Built modular structure (layers, activations, loss)
- Compared custom implementation with TensorFlow model
The following features will be implemented and added soon:
- Backpropagation
- Gradient descent optimization
- Training loop
- Model evaluation metrics
- Support for multiple hidden layers