Found a bug in. I was getting this error when running the Multiple Linear Regression.
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-43-a52416c0c3bf> in <module>
1 ### START CODE HERE ### (~ 1 line of code)
----> 2 parameters_multi = nn_model(X_multi_norm, Y_multi_norm, num_iterations=100, print_cost=False)
3 ### END CODE HERE ###
4
5 print("W = " + str(parameters_multi["W"]))
<ipython-input-20-105b6356d917> in nn_model(X, Y, num_iterations, print_cost)
26 ### START CODE HERE ### (~ 2 lines of code)
27 # Forward propagation. Inputs: "X, parameters". Outputs: "Y_hat".
---> 28 Y_hat = forward_propagation(X, parameters)
29
30 # Cost function. Inputs: "Y_hat, Y". Outputs: "cost".
<ipython-input-42-6ea40968b18a> in forward_propagation(X, parameters)
22 ### END CODE HERE ###
23
---> 24 assert(Y_hat.shape == (n_x, X.shape[1]))
25
26 return Y_hat
AssertionError:
n_X is not computed in the Multiple Linear Regression section and is not given to forward_propagation as a parameter. This variable holds the value (1) from the Single Single Linear Regression code.
I commented out
assert(Y_hat.shape == (n_x, X.shape[1]))
in forward_propagation to get it to work.