Skip to playerSkip to main content
  • 2 weeks ago

Category

📚
Learning
Transcript
00:03neural network towards in the backward direction ok. Now, we will try to find out what is the
00:11gradient of the loss function with respect to this weight w112 ok. So, we will calculate
00:19that one. So, let us calculate partial derivative of L with respect to del 1 1 2, this I want
00:37to calculate. Now, partial derivative of L with respect to del the last the weight in
00:46the last layer, I can write it as del L by del y into partial derivative of y with respect
00:57to 1 1 2, this we can write ok. This I will name as equation 1.1 because we will
01:07be coming
01:08back to this equation. So, just to keep a track of that.
01:11Now, from equation 1, we get del L or partial derivative of L with respect to y is nothing
01:26but 1 by 2 n summation 2 into t minus y into minus 1 which is equal to nothing but
01:371 by
01:38n summation y minus t. So, this is your partial derivative of the loss function with respect
01:47to 2 y. So, this I will put as 1.2. Now, we have done this we have calculated correct.
01:57Now,
01:57we have to calculate the second. This we need to calculate. How do we do that one? So, we
02:04have to calculate now partial derivative of y with respect to w112. If we see what is my
02:14y. y is nothing but sigmoid activation function working on z 1 2. Now, if we have sigmoid activation
02:27function sigmoid function working on x, we have we know the formula is 1 by 1 plus e to
02:33the power of minus x. If I take the derivative of this one with respect to x, what I get
02:40is
02:40this I can write as 1 plus e to the power of minus x to the power of minus 1.
02:47Then the derivative
02:48I can write as minus 1 1 plus e to the power of minus x to the power of minus
02:542 into e to
03:06the power of minus x. Now, this can be written as sigmoid of x 1 minus sigmoid of x. You
03:27can
03:28do it and then do it and then cross verify it. Now, this equation I will mark as 1.3
03:36fine.
03:42Again coming back to what where we left it your y is nothing but the sigmoid of z 1 2
03:51ok. Therefore,
03:56your del y partial derivative of y with respect to w 1 1 2 is equal to I can write
04:06it as sigma
04:09sigma z 1 2 by z 1 2 into del of z 1 2 by del omega 1 1 2
04:28ok. This we can write. Now, if
04:32we see this is the derivative of sigmoid function working on z 1 2 in the second layer. So, according
04:41to equation number 1.3 we can write this as sigmoid of z 1 2 into 1 minus sigmoid of
04:52z 1 2 into
05:00the same third term whatever is there here 1 1 2. This is coming from equation 1.3 ok. Now,
05:22what is my sigmoid of z 1 2? It is nothing but equal to y. This is my y. Therefore,
05:32I can write
05:33z del y omega 1 1 1 2 equal to y into 1 minus y into partial derivative of z
05:471 2 divided with
05:50respect to w 1 1 1 2 ok. Now, what is my z 1 2 made up of? Now, we
06:03can write z 1 2 can
06:06be written as see if we see here it is this output multiplied with this weight plus this output
06:15multiplied by this weight. If I write this one as h 1 for convenience this one as h 2 and
06:24this one as h 3. Then z 1 2 can be written as h 1 w 1 1 2 plus
06:34h 2 w 2 1 2 plus h 3 w 3 1
06:44h 2. Now, what is your h? h is nothing but h sorry h 1 is nothing but your sigma
06:55z 1 1, h 2 is equal
07:01to sigma z 1. So, what is your h? h 2 plus h 2 plus h 2 plus h 2
07:06plus h 2 plus h 2 plus h 2.

Recommended