Hi all,
I’m having an issue with the first exercise–seems like a pretty simple issue but I can’t quite spot what I need to change:
in two_layer_model(X, Y, layers_dims, learning_rate, num_iterations, print_cost)
88
89
—> 90 parameters = update_parameters(parameters, grads, learning_rate)
91
92 # YOUR CODE ENDS HERE
~/work/release/W4A2/dnn_app_utils_v3.py in update_parameters(parameters, grads, learning_rate)
378 # Update rule for each parameter. Use a for loop.
379 for l in range(L):
→ 380 parameters[“W” + str(l+1)] = parameters[“W” + str(l+1)] - learning_rate * grads[“dW” + str(l+1)]
381 parameters[“b” + str(l+1)] = parameters[“b” + str(l+1)] - learning_rate * grads[“db” + str(l+1)]
382
TypeError: can’t multiply sequence by non-int of type ‘float’
Values for dW1 (as an example) are currently being stored as a tuple of arrays, which seems like it could be the issue (attempting to multiply the learning_rate, a float, by a tuple, dW1).
Any ideas?