C5W1A2 Dinosaurs - Optimize_test error

When I run the test for the ‘Optimize’ function (UNQC3) all the values returned are correct but there is an assertion error “parameters have not been updated”. It seems such a simple function that i can’t see what I could do wrong.

Loss = 126.50397572165389
gradients["dWaa"][1][2] = 0.19470931534713587
np.argmax(gradients["dWax"]) = 93
gradients["dWya"][1][2] = -0.007773876032002162
gradients["db"][4] = [-0.06809825]
gradients["dby"][1] = [0.01538192]
a_last[4] = [-1.]
AssertionError                            Traceback (most recent call last)
<ipython-input-10-b28332be48fd> in <module>
     28     print("\033[92mAll tests passed!")
---> 30 optimize_test(optimize)

<ipython-input-10-b28332be48fd> in optimize_test(target)
     24     assert np.allclose(gradients['dWaa'][1, 2], 0.1947093), "Unexpected gradients. Check the rnn_backward call"
     25     assert np.allclose(gradients['dWya'][1, 2], -0.007773876), "Unexpected gradients. Check the rnn_backward call"
---> 26     assert not np.allclose(parameters['Wya'], old_parameters['Wya']), "parameters were not updated"
     28     print("\033[92mAll tests passed!")

AssertionError: parameters were not updated

Please send me your code of the optimize function in a private message. Click my name and message.


To inform others, make sure to call the update_parameters function to update the parameters.