Hi,

I’m trying to solve exercise 6 but I’m getting an error message that I can’t understand how to solve. anyone can help please?

All code before this step is working fine

ValueError Traceback (most recent call last)

in

----> 1 params, grads, costs = optimize(w, b, X, Y, num_iterations=100, learning_rate=0.009, print_cost=False)

2

3 print ("w = " + str(params[“w”]))

4 print ("b = " + str(params[“b”]))

5 print ("dw = " + str(grads[“dw”]))

in optimize(w, b, X, Y, num_iterations, learning_rate, print_cost)

36 # YOUR CODE STARTS HERE

37

—> 38 grads, cost = propagate(w, b, X, Y)

39

40 # YOUR CODE ENDS HERE

in propagate(w, b, X, Y)

30 # YOUR CODE STARTS HERE

31

—> 32 A = sigmoid(np.dot(w.T, X) + b)

33 cost = -1/m * np.sum(Y*np.log(A) + (1-Y)*np.log(1-A))

34

ValueError: operands could not be broadcast together with shapes (2,3) (2,2)

thanks a lot for the help