DEV Community

Anjal Binayak Adhikari
Anjal Binayak Adhikari

Posted on

How to implement backpropagation from scratch in python without any libraries?

I am a newbie at deep learning. I came so watching many tutorials, reading some articles on implementing neural networks with hidden layers. But all the tutorials seem to TensorFlow, Pytorch, or something else. I have a concept of SGD,MB SGD, chain rule, linear algebra. I know how to calculate the gradients for the hidden layer and how to update the weights. But I could not be able to implement it in my own code.

Top comments (3)

Collapse
 
robinrs profile image
Robin

I would recommend reading this book:

Tariq Rashid
Make Your Own Neural Network
Mainly about implementation of a neural network without library's expect numpy. Really good book

It's really good in explaining it, also all the code is on GitHub if you just want the solutions.

Collapse
 
anjalbinayak profile image
Anjal Binayak Adhikari

I got a lot of recommendations for this book. I gotta buy it now :)

Collapse
 
shoaibsajid profile image
ShoaibSajid

did you get to implement the backpropagation using simple python?