r/computervision • u/mosef18 • May 31 '26
Showcase Build a Trainable CNN from Scratch in NumPy
We just launched a new Deep-ML project: Build a Trainable CNN from Scratch in NumPy
The goal is to build a full LeNet-style convolutional neural network from the ground up using only NumPy.
It starts with the basics, like stable softmax, cross-entropy loss, accuracy, initialization, padding, and im2col.
Then you build the actual layers:
convolution forward and backward passes
max pooling
ReLU
flatten
linear layers
fused softmax + cross-entropy
SGD and Adam
full LeNet forward and backward pass
synthetic image data pipeline
training loop and evaluation
By the end, you’ll have every layer, gradient, optimizer, and training step wired into a working CNN classifier you can actually train.
The project has 59 small steps, so instead of jumping straight into one giant CNN implementation, you build it piece by piece.
1
4
u/siegevjorn May 31 '26
Why? Why not torch? Why should people use yours instead of torch / jax / keras?