Can somebody help me? All the other tests are passed, final model implementation error.
TypeError Traceback (most recent call last)
in
1 from public_tests import *
2
----> 3 model_test(model)
~/work/release/W2A2/public_tests.py in model_test(target)
123 y_test = np.array([0, 1, 0])
124
→ 125 d = target(X, Y, x_test, y_test, num_iterations=50, learning_rate=0.01)
126
127 assert type(d[‘costs’]) == list, f"Wrong type for d[‘costs’]. {type(d[‘costs’])} != list"
in model(X_train, Y_train, X_test, Y_test, num_iterations, learning_rate, print_cost)
34
35 # YOUR CODE STARTS HERE
—> 36 w,b=initialize_with_zeros(train_set_x[0])
37 #print(‘w :’,w.shape)
38 #print(‘b :’,b.shape)
in initialize_with_zeros(dim)
18 # YOUR CODE STARTS HERE
19
—> 20 w=np.zeros([dim,1])
21 b=0.0
22 # YOUR CODE ENDS HERE
TypeError: only integer scalar arrays can be converted to a scalar index