Wrong shape for W1 in course 1 week 3 exercise 3

Hello Team,

In the course 1 week 3 exercise 3 i get the following output:

W1 = [[-0.00416758 -0.00056267]
[-0.02136196 0.01640271]
[-0.01793436 -0.00841747]
[ 0.00502881 -0.01245288]]
b1 = [[0.]
[0.]
[0.]
[0.]]
W2 = [[-0.01057952 -0.00909008 0.00551454 0.02292208]]
b2 = [[0.]]

which is matched with the Expected output but i got the error
Wrong shape for W1.

My code snippet is as follows

{moderator edit - solution code removed}

please help.
Thanks in advance.

@Abhay25 I think your mistake is you are ‘hard coding’ the layer sizes.

Consider what variables you have coming into the function and ensure your solution is general.

4 Likes

Thank you very much.
It resolves the issue. :slight_smile:

1 Like

Its amazing :star_struck: