As a somewhat experienced Machine Learning Engineer (MLE), I have always been fascinated by the inner workings of neural networks. Despite having worked and contributed to various high-level libraries like Pytorch, I believe there is immense value in understanding and building neural networks from the ground up. This project aims to create a minimal, self-contained, and beginner-friendly neural network implementation using only NumPy.
- Minimal and self-contained neural network implementation
- Beginner-friendly with extensive documentation and examples
- Pure numpy-based operations
-
Linear layer
-
Forward pass
-
Autograd system
- Define computational graph
- Compute gradients
- Chain rule implementation
- Backpropagation
-
Activation functions
- ReLU
- Sigmoid
- Tanh
-
Backward pass
-
Loss functions
- Mean Squared Error (MSE)
- Cross-Entropy Loss
-
Optimizers
- Stochastic Gradient Descent (SGD)
- Adam
- Conv layers
- Scaled Dot Self Attention Layers
- Batch normalization
- Dropout
- GPU support with CuPy
- Model saving and loading
- Comprehensive test suite
- Documentation and tutorials
- Standalone Rust/C++ (probably a new project)