Backpropagation is a short form for "backward propagation of errors." It is a standard method of training artificial neural networks. This method helps to calculate the gradient of a loss function with respects to all the weights in the network
The backpropagation uses supervised learning. which means that the algorithm is provided with examples of the inputs and outputs that the network should compute, and then the error is calculated.
Backpropagation is fast, simple, and easy to program
It has no parameters to tune apart from the numbers of input
It is a flexible method as it does not require prior knowledge about the network
It is a standard method that generally works well
It does not need any special mention of the features of the function to be learned.
![](https://static.wixstatic.com/media/6e3b57_a96ad19f9d2f494aa3381e358c69c670~mv2.jpeg/v1/fill/w_980,h_550,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/6e3b57_a96ad19f9d2f494aa3381e358c69c670~mv2.jpeg)
FIG:1
HOW BACKPROPAGATION WORKS
![](https://static.wixstatic.com/media/6e3b57_b7c491b308d24996927ac71c67b268d1~mv2.jpeg/v1/fill/w_980,h_404,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/6e3b57_b7c491b308d24996927ac71c67b268d1~mv2.jpeg)
FIG:2
The above network contains the following:
Two inputs
Two hidden neurons
Two output neurons
Two biases
There are three steps involved in this:
Forward propagation
Backward propagation
Putting all the values together and calculating the updated weight value
Step – 1: Forward Propagation
We will start by propagating forward.
![](https://static.wixstatic.com/media/6e3b57_ca92923e02684bbfa8ece3b0e9b6c054~mv2.jpeg/v1/fill/w_980,h_580,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/6e3b57_ca92923e02684bbfa8ece3b0e9b6c054~mv2.jpeg)
FIG: 3
We will repeat this process for the output layer neurons, using the output from the hidden layer neurons as inputs.
![](https://static.wixstatic.com/media/6e3b57_5fe3831784ef4659a75349fd2ad8da65~mv2.jpeg/v1/fill/w_980,h_469,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/6e3b57_5fe3831784ef4659a75349fd2ad8da65~mv2.jpeg)
FIG:4
Now, let’s see what is the value of the error:
![](https://static.wixstatic.com/media/6e3b57_735e3584ac784c6a884a6381cf48fe95~mv2.jpeg/v1/fill/w_980,h_680,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/6e3b57_735e3584ac784c6a884a6381cf48fe95~mv2.jpeg)
FIG:5
Step – 2: Backward Propagation
Now, we will propagate backward. This way we will try to reduce the error by changing the values of weights and biases. Consider W5, we will calculate the rate of change of error w.r.t change in weight W5.
![](https://static.wixstatic.com/media/6e3b57_73bd537da07f432681e62e1cce34035f~mv2.jpeg/v1/fill/w_980,h_416,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/6e3b57_73bd537da07f432681e62e1cce34035f~mv2.jpeg)
FIG:6
Since we are propagating backward, the first thing we need to do is, calculate the change in total errors w.r.t the output O1 and O2.
![](https://static.wixstatic.com/media/6e3b57_794e5667d2c64a3ca543f7ad37063e6b~mv2.jpeg/v1/fill/w_980,h_220,al_c,q_80,usm_0.66_1.00_0.01,enc_auto/6e3b57_794e5667d2c64a3ca543f7ad37063e6b~mv2.jpeg)
FIG:7
Now, we will propagate further backward and calculate the change in output O1 w.r.t to its total net input.
![](https://static.wixstatic.com/media/6e3b57_2db85e82232340f4bbaf6ecbd01d3175~mv2.jpg/v1/fill/w_980,h_207,al_c,q_80,usm_0.66_1.00_0.01,enc_auto/6e3b57_2db85e82232340f4bbaf6ecbd01d3175~mv2.jpg)
FIG:8
Let’s see now how much does the total net input of O1 changes w.r.t W5.
![](https://static.wixstatic.com/media/6e3b57_c2f2dd1990c94411b1407dcb3cbd3104~mv2.jpeg/v1/fill/w_943,h_216,al_c,q_80,enc_auto/6e3b57_c2f2dd1990c94411b1407dcb3cbd3104~mv2.jpeg)
FIG:9
Step – 3: Putting all the values together and calculating the updated weight value
Now, let’s put all the values together:
![](https://static.wixstatic.com/media/6e3b57_660f7470682744fea7366c18de8ec31e~mv2.jpeg/v1/fill/w_897,h_180,al_c,q_80,enc_auto/6e3b57_660f7470682744fea7366c18de8ec31e~mv2.jpeg)
FIG:10
Let’s calculate the updated value of W5:
![](https://static.wixstatic.com/media/6e3b57_bb14963ea7464d86953d981e213a5459~mv2.jpeg/v1/fill/w_928,h_377,al_c,q_80,enc_auto/6e3b57_bb14963ea7464d86953d981e213a5459~mv2.jpeg)
FIG:11
Similarly, we can calculate the other weight values as well.
After that, we will again propagate forward and calculate the output. Again, we will calculate the error.
If the error is minimum we will stop right there, else we will again propagate backward and update the weight values.
This process will keep on repeating until the error becomes minimum.
コメント