W4_A1_Dimension error


I took transpose but it resulted in bias not been able to broadcast ? what should I do?

Hello Ayush Bhosale,

Such an error shows that the inner dimensions are not aligned.

Shapes (3,4) & (3,4)= dimensional mismatch

So, what’s the error here?

well I did try to take transpose of weight but it resulted in bias not been able to broadcast what can be the solution for this because before all test before where passed please help

Ayush, are you using the right activation for the outer layer?

Maybe transposing the weight was not the correct choice.

The error with broadcasting the ‘b’ value could have been caused if the result of the dot product was the wrong shape.

Yes I am using sigmoid

well I did it both way with transpose(broadcasting error) and without transpose(Shape did not match) but

I solved this there was a bug thankyou Rashmi and TMosh :pray:

Glad to hear you found the solution. For anyone else who sees this thread and has a similar issue, the key is to do the “dimensional analysis” so that you know what dimensions to expect for A and Z at every level. Here’s a thread which walks you through that and gives you a valuable tool for debugging situations of mismatching shapes.