C5 W4: Transformers Architecture with TensorFlow

Hello,

I am working on the activity “Programming Assignment: Transformers Architecture with TensorFlow”, I reviewed the codes in all cells and they were all executed successfully.
When I submit the activity to “grid” the following errors occur.

Code Cell UNQ_C1: Function ‘get_angles’ is correct.
Code Cell UNQ_C2: Function ‘positional_encoding’ is correct.
cell_UNQ_C3 function scaled_dot_product_attention failed test 2(with mask)
cell_UNQ_C4 function EncoderLayer.call failed test 1
cell_UNQ_C5 function Encoder.call failed test 1
cell_UNQ_C6 function DecoderLayer failed test 1
cell_UNQ_C7 function Decoder.call failed test 1
cell_UNQ_C8 function Transformer.call failed test 1
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.

Already tried:

  • review previous codes;
  • I shutdown the server
  • I executed the “Run” command for each cell
  • I assessed whether there were repetitions

I know how fix this?

Thanks in advance

If refreshing your workspace doesn’t solve the issue, please click my name and message your notebook as an attachment.

Hi @carlosxcruz,

You have either made significant changes in the notebook yourself, or have taken an older version of the assignment from the internet and tried submitting that.

This is the Ex 1 in your notebook:
Screenshot 2023-10-20 at 11.37.55 AM

This is Ex 1 from the notebook we have provided:
Screenshot 2023-10-20 at 11.38.39 AM

Notice the differences ?

Similarly, this is the unit test cell of Ex 1 of your notebook:

This is from what we have provided:
Screenshot 2023-10-20 at 11.40.46 AM

I see similar changes in the rest of your notebook as well.

So, as per @balaji.ambresh’s reply above, refresh your workspace and carefully work on the solutions in the assignment notebook we have provided.

Best,
Mubsi

Thanks @balaji.ambresh and @Mubsi very usefull.