Das Video kommt von YouTube: erst beim Abspielen verbindet sich die Seite mit YouTube (Google).
#1 Solved Example Back Propagation Algorithm Multi-Layer Perceptron Network by Dr. Mahesh Huddar
Das Wichtigste aus dem Video
Tipp auf eine Zeit – das Video springt genau dorthin.
Transkriptautomatisch erstellt · 96 Zeilen
- hi welcome back in this video i will discuss how to apply back propagation algorithm
- to update the weights in multi-layer perceptron network this is the problem definition assume that the neurons have sigmoid
- activation function perform the forward pass and backward pass on the network assume that the actual output is 0.5 and
- the learning rate is 1 in this case perform another forward pass so this is the network given to us in this case so we have two inputs that is x1 and x2
- with values 0.35 and 0.9 there is one hidden layer with two neurons h3 and h4 and one output neuron that is o5 in this
- case y3 and y4 are the outputs of hidden unit and wi-fi is the output of output unit in this case
- w13 w14 w23 and w24 are the hidden layer weights with the initial weights of 0.1 0.4 0.8 and 0.6 respectively
- w35 and w45 are the output unit weights with 0.3 and 0.9 respectively now what we need to do here is we need to propagate this input
- through this network by calculating the output at the hidden needs as well as the output at the output layer
- once you calculate this output we need to check what is the error at the output unit and then that error should be propagated back to this particular
- hidden units and then we need to calculate the error at hidden units also based on this particular error terms we
- need to update this particular weights and then we need to propagate this input again in the forward pass that is nothing but
- perform another forward pass here similarly we have to do this particular steps again and again unless and until we are happy with the error what we get
- at the output layer here but in this case i'm going to show it for two times one time i will propagate the
- input i will update the weights and then i will propagate the input through this particle network one more time so that
- is two times i will show here now we will try to propagate this input through the network that is the forward pass here for that
- reason we need to calculate this y3 y4 first and then these y3 and y4 are the inputs to this particular o5 again we will calculate wi-fi here
- to calculate this y3 and y4 first we need to calculate what is that called as the summation term that is nothing but w
- i j multiplied by x i once you calculate this particular summation term we need to apply the activation function so that i will get
- this particular y 3 and y 4. similarly we need to give this y y 3 and y 4 as the input to here and then we need to calculate the summation term and
- then again we need to apply the activation function so that i will get the wi-fi here now what is the actuation function i'm
- going to use i'm going to use the activation function as the sigma term that is nothing but 1 divided by 1 plus e raised to
- minus x in this case i'm calculating aj hence it is minus aj here so first we will calculate the value of aj that is the summation term at h3
- that is nothing but a1 here a1 is equivalent to w 1 3 multiplied by x 1 plus w 2 3 multiplied by x 2 so that is the
- term over here so if i put those particular values i will get 0.755
- that is w13 is 0.1 x1 is 0.35 that is the term over here similarly point 8 is w2 3 and x2 is 0.9 so that is what i have written here
- now once you get this particular a1 i have to apply the activation function so that i will get y 3 here y 3 is equal to f of a 1 which is equivalent to 1
- divided by 1 plus e raised to minus a 1 here a 1 value is 0.755 i will get 0.68 in this case so this is the output at h3 here
- similarly i will calculate the output at h4 that is nothing but a2 is equal to w14 multiplied by x1 plus w 2 4
- multiplied by x 2 so that is what i have written here and then i will put the values i will get a 2 as 0.68 i will calculate the y 4 by applying
- activation function here y 4 is equal to 1 divided by 1 plus e raised to minus a 2 that is 0.68 i will get a 0.6637 here
- so i got the value of y 3 i got the value of 4 by 4 here now i will give this as an input to this o5 and then calculate wi-fi here
- so if i want to calculate the wi-fi first i will calculate e3 here a3 is nothing but w35 multiplied by y3 plus w 4 5 multiplied by y 4 here
- so i will put all those particular values here i will get 0.801 as the a3 now i will put this particular
- a3 or i will pass a3 as to the activation function i will get wi-fi here wi-fi is equivalent to f of a3 that is nothing but 1 divided by 1 plus e
- raised to minus a3 e3 values 0.801 which is equal to 0.69 that is the output at the output unit here so the output at the output in it is 0.69
- now what is the expected output the expected output is 0.5 but i am getting 0.69 so the error is equivalent to the expected is 0.5 here but i am
- getting point what we can say that 0.69 so the error will be in this case we can say that minus 0.19 in this case so this is how actually we can propagate
- the input through the network and then we calculate the error here now once you calculate this error uh we have to cross check whether i'm happy
- with the error or not if it is not we have to update this particular weights in this case i will try to update the
- weights and then i will try to show how can we reduce this particular error over here now if i want to update the weights we
- have to use this particular equation that is uh delta wji is equivalent to n that is the learning rate multiplied by delta j that is the error term at the
- jth unit oi is nothing but the output at ith unit in this case now how to calculate this particular delta j because we know the value of the
- learning rate that is equivalent to 1 in this case that is a constant value we can consider for a given problem but delta j is the error at the jth unit
- so we have to calculate it so there are two kind of units are there uh in this case you can see here these two h3 and h4 are the hidden units o5 is
- the output in it so if the j is the output in it the delta j is equivalent to oj multiplied by 1
- minus oj multiplied by tj minus oj that is the output at the jth unit multiplied by 1 minus output at jth unit multiplied by target
- minus the calculated output at the jth unit similarly if j is the hidden unit now we used need to use this equation that is
- delta j is equivalent to again vj multiplied by 1 minus oj but summation of delta k multiplied by k j where k is the number of output units in
- this case so using these particular equations we calculate the delta j term we have already calculated the output at each
- unit using those three we will calculate the modified weight in this case so first we will try to calculate the delta term at each and every unit so
- first we calculate the delta term at the output in it that is delta 5 because it's the output in it which is equivalent to y minus 1 minus y that is
- the calculated output multiplied by 1 minus calculated output multiplied by what is the value we have here
- this is t j multi minus oj tj is what the target output that is 0.5 what we are expecting and why is the calculated output
- so what is the calculated output in this case is 0.69 0.69 1 minus 0.69 0.5 is the target 0.69 is the calculated output hence delta 5 is equivalent to
- minus 0.0406 here now we will try to understand how to calculate the error term at h3 here so
- if you want to calculate error at h3 the equation is uh we have to use this one the second equation that is delta 3 is equal to y3 multiplied by 1 minus y3
- that is the calculated output that is 3 multiplied by 1 minus y3 multiplied by this weight that is w35 and the error calculated at the output in it that is
- delta phi because we have only one output in it we get the summation term as only once if we have multiple number of output ends i will get the summation
- here i will put all the values here i will get the answer as point minus 0.00265
- similarly i will calculate the error term at h1 also that is delta 4 is equivalent to y4 multiplied
- by 1 minus y4 multiplied by this error weight and the error at this particular output in it that is 0.9 multiplied by this we have
- already calculated i will put it over here so the total answer in this case is minus
- 0.008 to here so what we did is we calculated error at the output in it we calculated the error at the hidden units so using this thing
- we have to modify this particular weights here that is a delta wj is equivalent to learning rate multiplied by delta j
- multiplied by oi here so what i do here is i will put the calculated values uh i will show one example that is a
- point w four five delta w four five is equivalent to n multiplied by delta phi
- y 4 which is equivalent to point minus point 0 to 6 9 similarly we will calculate uh one more
- this is a delta term actually this is not the final term this is just a delta term so what we do is we will add this thing to the previous weight what is the
- previous weight here 0.9 so to this particular previous weight we will add this particular the delta term
- if i add it i will get this particular thing that is nothing but the modified weight here similarly i will show one more that is
- uh w one four w one four is equivalent to n multiplied by delta four x one uh that is 1 multiplied by
- the delta 4 we know that value delta 4 somewhere we have calculated it this is the delta 4 value multiplied by 0.35 that is x 1 uh the
- delta term what we get here is or you can say that the increment or decrement we will get is uh minus
- 0.20287 once you add it to the old value i will get the modified weight here so this is the modified weight
- so this is how actually we can calculate the modified weights in this case i have shown two this point nine is modified to 0.8731
- and this point four is modified to point three nine seven one in this iteration similarly we have to calculate all the
- modified weights here so once you calculate this particular modified weights you can see here wji is calculated for every combination
- and then we have got this particular updated the wgi by adding this particular delta wji to the old value
- now once you get this particular updated values so for all the weights we the network looks something like this you can see here w one three is equal to
- point zero zero zero nine nine one uh w two four is equal to point uh five nine two six and so on again we need to forward uh pass this
- particle x1 and x2 forward through this network and then we need to calculate the output if the output is
- correct or acceptable we can stop here otherwise we need to use the same process like calculating the error at each neuron updating the
- weights and then passing this particular input forward through this network the same process
- has to be followed again and again in this case so first what we do is we try to calculate what is y3 y4 and y5
- y3 if you want to calculate first we need to calculate the summation term and then we need to apply this activation function again here
- so we have this value so we've calculated y3 is 0.6797 so previous value was 0.68 now it is
- modified to 0.6797 similarly we calculate uh the y4 first we calculate the summation term and then we use this activation
- function to get this particular value now the modified y4 is 0.6620 previously it was 0.6637 we calculate the output at the output
- layer which is equivalent to 0.6820 here previously it was 0.69 once you do this particular thing we try
- to calculate the error here so error in this case is 0.5 minus 0.6820 which is equivalent to point minus 0.182 in this case
- now in this case i have shown only two forward passes but actually uh if you are not happy with this particular error uh you have to do this
- thing again and again like modifying the weights and then for passing this particular input forward through this particle network and so on
- so in this video i try to explain how we can apply back propagation algorithm in multi-layer perceptron network so that we can update the weights
- until we get the acceptable output in this case i hope the concept is clear if you like the video do like and share
- with your friends press the subscribe button for more videos press the bell icon for regular updates thank you for watching
Zum Nachlesen
BackpropagationFehlerrückführung bzw. Rückpropagierung ist ein verbreitetes Verfahren zum Einlernen künstlicher neuronaler Netze. Es gehört in der einfachen Form zur Gruppe …
Multi-Layer-PerzeptronDer Backpropagation-Algorithmus wird oft verwendet, um die Gewichtsaktualisierung zu berechnen. Der Backpropagation-Algorithmus nutzt das Konzept der …
Künstliches neuronales NetzEin künstliches neuronales Netz besteht aus mehreren künstlichen Neuronen, die miteinander verbunden sind und in der Regel in Schichten organisiert werden. Im …
Künstliches NeuronEin künstliches Neuron bildet die Basis für das Modell der künstlichen neuronalen Netze, ein Modell aus der Neuroinformatik, das durch biologische neuronale …