r/computervision • • May 31 '26

Showcase Build a Trainable CNN from Scratch in NumPy

Post image

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.

Link: Deep-ML | Practice Machine Learning

101 Upvotes

3 comments sorted by

4

u/siegevjorn May 31 '26

Why? Why not torch? Why should people use yours instead of torch / jax / keras?

4

u/mosef18 Jun 01 '26

Probably going to make those versions Buts started with numpy so people could really understand how the model works

1

u/Significant-Back-41 Jun 03 '26

Where's the link