When creating a post, please add:
Why A.transpose was took and why not A
dw1=dz2.a1t
When creating a post, please add:
Why A.transpose was took and why not A
dw1=dz2.a1t
If you don’t transpose it, it will be the wrong shape for a matrix product.
thats the only reason ? so if shape of A matrix was suited then no transpose and also shape of matrix does not matters other then matrix multiplication because in logistic regression their was no X transpose in X.W.
Well, it’s a little deeper than that. Everything here is driven by the math. The formulas you are showing there are for back propagation and Prof Ng has specifically designed these courses not to require knowledge of any calculus, let alone matrix calculus. So you have to accept the formulas as he gives them to you. If you have the math background to understand or want to go deeper, here’s a thread with lots of links to cover all this, but it is considered “beyond the scope” of this course.
If the shapes are already correct for a specific operation, then no transposition is needed.
@Ayush_Bhosale, but the equation should always work, shouldn’t it? Not just the case that the shapes happen to match without a Transpose, would you agree ?
Cheers,
Raymond