Hello,
I am having a problem with the assignment for week 4 of the course “Deep Neural Network - Application”
The problem is the following: When testing function “two_layer_model(X, Y, layers_dims, learning_rate = 0.0075, num_iterations = 3000, print_cost=False):” via the test commands:"
parameters, costs = two_layer_model(train_x, train_y, layers_dims = (n_x, n_h, n_y), num_iterations = 2, print_cost=False)
print(“Cost after first iteration: " + str(costs[0]))
two_layer_model_test(two_layer_model)”
I get the error:
" ValueError 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)
ValueError: too many values to unpack (expected 2)”
According to what I can see online while trying to solve the problem, I noticed that on previous version of this exercise, the test call to the test function has “print_cost=True” while in the exercise version that I am doing, the same call to the same function has “print_cost=False”. As such, the graphic for the cost gets empty and I get the error stated above. I can have all the assignments of this course passed but this one is failing due to this error and I am not capable of understanding why this error or what am I doing wrong.
Any help would be gladly appreciated.
Regards,
Luís