Error! Please make sure you have passed the value correctly in the “activation” parameter
UnboundLocalError Traceback (most recent call last)
in
----> 1 parameters, costs = two_layer_model(train_x, train_y, layers_dims = (n_x, n_h, n_y), num_iterations = 2, print_cost=False)
2
3 print("Cost after first iteration: " + str(costs[0]))
4
5 two_layer_model_test(two_layer_model)
in two_layer_model(X, Y, layers_dims, learning_rate, num_iterations, print_cost)
47 # YOUR CODE STARTS HERE
48 A1, cache1 = linear_activation_forward(X, W1, b1, ‘relu’)
—> 49 A2, cache2 = linear_activation_forward(A1, W2, b2, ‘softmax’)
50
51 # YOUR CODE ENDS HERE
~/work/release/W4A2/dnn_app_utils_v3.py in linear_activation_forward(A_prev, W, b, activation)
212 print(“\033[91mError! Please make sure you have passed the value correctly in the "activation" parameter”)
213
→ 214 assert (A.shape == (W.shape[0], A_prev.shape[1]))
215 cache = (linear_cache, activation_cache)
216
UnboundLocalError: local variable ‘A’ referenced before assignment