Week4, A1, UNQ_C8

I am getting a “AssertionError: Wrong values in translation” in Exercise 8

Here’s my output

AssertionError                            Traceback (most recent call last)
<ipython-input-33-a562b46d78e0> in <module>
      1 # UNIT TEST
----> 2 Transformer_test(Transformer, create_look_ahead_mask, create_padding_mask)

~/work/W4A1/public_tests.py in Transformer_test(target, create_look_ahead_mask, create_padding_mask)
    286     assert np.allclose(translation[0, 0, 0:8],
    287                        [0.017416516, 0.030932948, 0.024302809, 0.01997807,
--> 288                         0.014861834, 0.034384135, 0.054789476, 0.032087505]), "Wrong values in translation"
    289 
    290     keys = list(weights.keys())

AssertionError: Wrong values in translation

I guess the test is trying to compare the first few elements of my output to the expected values and failing.

I have passed the tests for all other exercises.

Please help.

An quick search of the forum for the term “wrong values in translation” will turn up a lot of threads on this:

For example:

Encounter exactly the same error; can’t figure out where goes wrong, need some support…

Checked last linear layer setup, dense with target vocab size, input sentence with encoder, output sentence with decoder…

If I recall correctly, the error was on one of the previous exercises and not on UNQ_C8. Though I had passed the test cases for that exercise, there was a mistake in that exercise which is causing this exercise to fail. Hope this helps.