Course 1, Week 2, exercise 8: w and X shape

Hi!

I think I am correctly specifying the dimensions of w:
w, b = initialize_with_zeros(X_train.shape[0])
but I get the following error:
ValueError: shapes (1,4) and (2,3) not aligned: 4 (dim 1) != 2 (dim 0)
I am pretty sure the dimensions of w should be (2,1) after my assignment and hence the thing should be multiplying by (1,2)x(2,3). I have gone through all the functions before that and it doesn’t seem to help (all prior tests are also passed)
What can it be?

Hi misha_g,

Think about the parameters you pass to the optimize function; are these correct?

1 Like

Ahaha, thank you! it works now

You’re welcome.

Can you please remove the code from your post? Thanks and good luck with the rest of the course!

1 Like