r/learnmachinelearning • • 10h ago

Project I built a neural network from scratch using only NumPy.

Post image

I wanted to know what actually happens inside loss.backward().

So I built a neural network with nothing but NumPy. Every gradient derived on paper, every layer written by hand, every derivative checked numerically.

98.05% on MNIST.

Code and derivations: https://github.com/Meckmin/mnist-numpy-from-scratch

70 Upvotes

7 comments sorted by

21

u/Background-Funny1237 4h ago edited 4h ago

my brother, you are overfitting

edit: val loss has been stagnating for the last 15 epochs while train loss gets lower and lower, this is why it seems like overfitting to me

1

u/Necessary_Guest_4412 3h ago

Thanks for the feedback

1

u/CryptographerOne7003 2h ago

could be, I stared so much at val loss that it tells me nothing anymore.

0

u/Exact-Contact-3837 39m ago

How does this have so many likes, I made this post about a month ago and I've just not stopped seeing just more and more "...from scratch" posts on this sub with ridiculous amounts of likes. Reddit is falling bruh

1

u/Necessary_Guest_4412 5m ago

its a very common project.

0

u/mtbdork 16m ago

Reddit (and social media writ large) is at least 85% bot activity.