Course 5 Week 4 Programming Assignment Grading Error

I think I correctly implemented “Transformer” (it is quite straight forward) but got a grading error as follows:

Code Cell UNQ_C1: Function ‘get_angles’ is correct.
Code Cell UNQ_C2: Function ‘positional_encoding’ is correct.
Code Cell UNQ_C3: Function ‘scaled_dot_product_attention’ is correct.
Code Cell UNQ_C4: Function ‘EncoderLayer’ is correct.
Code Cell UNQ_C5: Function ‘Encoder’ is correct.
Code Cell UNQ_C6: Function ‘DecoderLayer’ is correct.
Code Cell UNQ_C7: Function ‘Decoder’ is correct.
Code Cell UNQ_C8: Unexpected error (InvalidArgumentError()) occurred during function check. We expected function Transformer to return type <class ‘tuple’>. Please check that this function is defined properly.
If you see many functions being marked as incorrect, try to trace back your steps & identify if there is an incorrect function that is being used in other steps.
This dependency may be the cause of the errors.

What helped me was to Restart the Kernel and clear the output, and afterwards run all cells again, then submit the assignment again.

=> 100/100!

Hi, Tyyim!

You should notice that the the expected function must return as tuple. Check, whether you are implementing it correctly.