Hi, all.

I have been working on week 2’s programming assignment and I have passed all the tests up to and including the model test.

When I run the regression model, it says

ValueError Traceback (most recent call last)

in

----> 1 logistic_regression_model = model(train_set_x, train_set_y, test_set_x, test_set_y, num_iterations=2000, learning_rate=0.005, print_cost=True)

in model(X_train, Y_train, X_test, Y_test, num_iterations, learning_rate, print_cost)

38 w = params[“w”]

39 b = params[“b”]

—> 40 Y_prediction_test = predict(w, b, X_test)

41 Y_prediction_train = predict(w, b, X_train)

42 # YOUR CODE ENDS HERE

in predict(w, b, X)

22 # A = …

23 # YOUR CODE STARTS HERE

—> 24 A = sigmoid(x.T * X + b)

25

26 # YOUR CODE ENDS HERE

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

I don’t know where I messed up because all of my other tests passed.

Thanks for your help!