Problems with exercise 7 and 8 with Transformer_Subclass

Im not sure what I am doing wrong I have issues with the assertion but i keep reading in the forum about how you just have to comment them i have also seen the mention of Tensor flow documentation buy i have still not found my error and I´m not sure were to start. Here is my code

(Solution code removed by staff)

Any guidance would be appreciated

Hey @Aysaac,

you should never comment assertion in the unit tests of the assignments.

I would advise you to

  • Refresh the notebook
  • Then, implement each code section one by one.
    • Make sure your code is only located between markers START CODE HERE and END CODE HERE.
    • If tests for the code section fail, as for help on the forum. Try to describe the problem, do not share your code. Make sure you checked posts with related questions of other students, before creating a new post.

I’ve just checked the last version of the assignments, tests work perfectly fine.

Are you sure? i have seen multiple forum post being also stuck with 75/100 iwth similar issues sugestion the same solution. I have also seen multiple forums with the same problem solving it by comentiong assertions out like [Week 4] Assignment 1 >> Decoder class error - #61 by Abdou and many others.
Thanks in advance

My code is identical to yours, passed with no error.

Hi, sometimes the test doesn’t catch all the wrong doing in the code, for the decoder section, I forgot to add ‘training’ as parameter to the dropout layer, the code passed the test with no error

You should never comment assertion in the unit tests of the assignments.

I’ve checked the last version of the assignments, it works. You need to refresh it if you have an older version.

The training argument set to True by default. I guess the note about it in the assignment just to make sure you don’t miss it implementing your solutions outside the class.

2 Likes

for the first block i have

Am I missing something?

@Aysaac Make sure you are passing an attention mask to your attention layer.

Please, remove the code from your post. That’s against the rules.

It worked thank you.