W4_A1_Ex-8_Linear_Activation_Backward_Tests Failed

Hello. I got this error, but can not understand why.

AssertionError Traceback (most recent call last)
in
11 print("With relu: db = " + str(t_db))
12
—> 13 linear_activation_backward_test(linear_activation_backward)

~/work/release/W4A1/public_tests.py in linear_activation_backward_test(target)
378 ]
379
→ 380 multiple_test(test_cases, target)
381
382 def L_model_backward_test(target):

~/work/release/W4A1/test_utils.py in multiple_test(test_cases, target)
140 print(‘\033[92m’, success," Tests passed")
141 print(‘\033[91m’, len(test_cases) - success, " Tests failed")
→ 142 raise AssertionError(“Not all tests were passed for {}. Check your equations and avoid using global variables inside the function.”.format(target.name))
143

AssertionError: Not all tests were passed for linear_activation_backward. Check your equations and avoid using global variables inside the function.

Finally I resolve the problem, no need for answer.

Great to hear that you were able to resolve the problem yourself. Good luck with the rest of the course!

Thank you very much.

Can I ask another question?
I finish the assignment and passed all the tests, but there is not “Submit Assignment” button in python, how can I submit my work?

Hi Lilit,
Thanks again. There have unfortunately been some problems with the submit button when migrating to the new Coursera platform. See the below link that was posted by the DLS team; best is to directly contact the Coursera Help Center, who is working on fixing these issues. But in the meantime, do keep us in the loop as well so we are aware and the coaching team can help where possible.

regards Stephanus

https://community.deeplearning.ai/t/issues-related-to-submit-button-and-resetting-deadlines/271?u=sjfischer

thank you @sjfischer

Unfortunately, I get the same error and could not figure out why,
can someone please point out what I am doing wrong.
Thank you.

It works now.
Earlier, I used the mathematical formular provided for dZ instead of calling the already exiting function. Calling the function with the right variables solves the problem.

This was my issue as well. It’s not clear that the sigmoid_backward and reul_backward implementations fully compute dZ. I was interpreting it as only implementing the derivative of g, i.e. the g’(Z[1]) portion when it was actually also multiplying by dA within those backward functions.

To get the correct output, I should not have been multiplying by dA explicitly as that part of the computation is handled in the hidden implementations of the backward activation functions provided.


  1. l ↩︎