C4_W4: Assertion error in Exercise 2 and 3

Hi,
I am facing an assertion error in exercise 2 and 3 test cases, despite writing the equations correctly and performing concatenation as required. Is it an issue with the test function?

AssertionError Traceback (most recent call last)
in
1 # BEGIN UNIT TEST
----> 2 w4_unittest.test_reversible_layer_forward(reversible_layer_forward)
3 # END UNIT TEST

~/work/w4_unittest.py in test_reversible_layer_forward(target)
86 failed_cases += 1
87 try:
—> 88 assert np.allclose(res, test_case[‘expected’])
89 successful_cases += 1
90 except ValueError:

AssertionError:

Hi @Shaun_Basil_Almeida

Well, for assert statements to be clear to learners, the test creator should have added a descriptive assertion message. :roll_eyes:

In this case it’s clear that your res did not match test_case[‘expected’] with the help of np.allclose. In other words, values are not exactly the same and you should look for a mistake in your code why is that the case.

Cheers

1 Like

Hi @arvyzukai. If there was a mistake in my code, it would have mostly occured in the same or previous cells but couldn’t find any. Can I share my nb with you?