DLS Course 5, week 4, possible bug in unit test of encoder layer

Hi, I suspect a blocking bug in transformer programming assigment. Indeed, in question 5 about encoder, i failed unit test with message AssertionError: Wrong values case 1.

But when the encoder code is called in the last question of the assignment (question 8), I passed the test. Which proves that my encoder code is valid, so I should pass the test in question 5 too.

Can you check the unit test in question 5 and share your thoughts with me?

Regards, Charles.

Your code should pass all of the unit tests.

Also, none of the unit tests prove that your code is perfect. They don’t test for every possible error in your code.

Hi, thank you for your answer. I understand that. But I pass 7 out of 8 tests, I failed only one test. And my score is 0/100 and it is said that the student code can’t be compilled because of only one failed test.

As far as I understand, my score should be 7/8 = 87.5% and I should validate the assignment. What do you think?

Thank you for your feedback.

Regards.

I add to my previous post that I keep thinking that my code for question 5 of transformer assignment is valid because it is in line with tensor flow tuto about that topic. I would like a pair assessment for that question, or at least a human review, in order to have a human point of view of my work.

Thank you again for your support. Regards. Charles.

It sounds like the error in one of your functions is causing the grader to crash - so you get zero points since it never completed.

Do not rely on TensorFlow’s tutorials - this course does not exactly follow them.

Hi Tom, Thank you for your time and answser. I finally found an corrected the error, it was not on the function I thought, but in another one. It was tricky because the faulted fonction passed the unit test but indirect cause another function to fail unit test.

I am happy to announce that I am currently certified from the specialization.

Regards. Charles

were you getting this error? Please tell me how you fixed it!

AssertionError: Wrong values in attn_w_b1. Check the call to self.mha1

Hi, no I had another error, and this error was coming from another function than the one which failed the unit test. And the faulted function was succedeed its unit test. Very tricky.

Hello Charles.
What function was the problem? Because I have the same error.
“AssertionError: Wrong values case 1”

Hi Jeff, the function encoderLayer causes the problem