Value Error- Operands could not broadcast- Exercise 8(model)

I am not understanding how to solve this Value Error, please someone help.

Hi, my guess is that the size of Y_prediction_train and Y_train are different. Can you check in your code what are their shapes?

1 Like


why does it say those two variables are not defined?

Hi, you have to check its shape inside the function where those variables are used because those are not global variables. So below the if print_cost: add two prints with the shapes.