lewisnjue/nnetflow
A minimal, NumPy-based deep learning library with a clean, educational reverse-mode autodiff engine
What's novel
A minimal, NumPy-based deep learning library with a clean, educational reverse-mode autodiff engine
Code Analysis
10 files read · 3 roundsA NumPy-based neural network library implementing reverse-mode automatic differentiation from scratch, with layers (Linear, Conv1d/2d, BatchNorm, LayerNorm, MultiHeadAttention), optimizers (SGD, Adam, Adagrad, RMSProp), and losses for educational purposes.
Strengths
Genuine from-scratch autodiff engine with correct gradient rules, broadcasting-aware unbroadcast, and einsum-based convolution. Tests validate gradients against PyTorch as a reference, which is a strong correctness strategy.
Weaknesses
RMSProp has a crash bug (undefined variable in __init__), Conv backward uses slow Python loops for scatter-add, pyproject.toml lists torch as a runtime dependency (not just test), and setup.py/pyproject.toml dependencies are inconsistent. README claims GPU/CuPy support that isn't visible in the code read.
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
145
Contributors
1
Files
51
Active weeks
18
Repository
Language
Python
Stars
2
Forks
0
License
MIT