Week 4, Assignment 1, Exercise 5 : Wrong shape issue

I am getting the wrong shape for my output for Week 4 Assignment1, Exercise 5 problem. I can not seem to figure out what I am doing wrong. Can you kindly provide some guidance on what I am doing wrong? Thank you and please see below the output from the test section of this problem.

This is the “2hidden” test case for L_model_forward. The output should be 1 x 4, but yours turns out to be 3 x 4. So now you need to figure out how that happened. Here’s a thread which walks you through the “dimensional analysis”. That should give you a way to figure out where the problem is.

1 Like

Thank you very much, the thread helped me figure out what my problem was and everything works as expected now. Thank you once again for your assistance.

1 Like

That’s great news that you were able to find the solution based on that information. Nice work! Please remember that “dimensional analysis” technique for future such cases: it’s the best way to start the debugging process when you get a dimension mismatch error. Onward! :nerd_face: