Course 1 Week 2

I understand dw is a column vector with but how dw+=x(i)dz(i) shouldnt dw1 be +=x1(i)dz(i) and so on for all separate dw how they added all at once.

Hello @Lost_Teo,

Here, dw1, dw2, and so on are replaced with a ‘dw’ (column vector) comprising all the individuals.
And you can see that dw1 is updating with for loop for ‘m’ training examples of x1 and similarly dw2 for x2. So, with the vectorized approach dw += x(i).dz(i) is doing the same.
You can have a look at this repository for a better understanding of what is going behind the codes.

All the best

1 Like

Thanks alot i got it

1 Like