C5W4 - Exercise 7 -Wrong values in outd

I have been trying to finish the last notebook of the specialization, but I am not able to complete the Exercises 7 and 8.
I guessed that the procedure for the Decoder class is similar to Encoder, but when I run the test cell I find the following error in the assert (all the previous exercises passed correctly):

I have read some of the previous posts in the forum, but I cannot find the correct answer for the current version of the notebook. My code is the following:

Since I should not upload code, the first part of the cell is the same as a used in the encoder:
FIrst line:
x = self.embedding(x)
In the for loop:

x, block1, block2 = self.dec_layers[i](x, enc_output, training, look_ahead_mask, padding_mask)

I agree with you that the Encoder and Decoder functions are quite similar.

I have the same problem. I passed exercises 1 to 6. And exercise 7, I got exactly the error. Have you fixed it?

I just passed exercise 8, but exercise 7 is still wrong.

I am having the same issues. I can’t seem to pass exercise 7 and 8 somehow and keep ketting a score of 75/100. I have the most recent version of the workbook and followed the transformer model guide from Tensorflow.

Help would be greatly appreciated (subscription is ending soon…)!

I reproduced your case by making a little mistake. Please check this line in UNQ_C7:
Don’t hard-code training=True or False, it comes from a function argument.

It worked. Thank you for your reply !!

Step 4 says, " 1. Pass the encoded embedding through a dropout layer, remembering to use the training parameter to set the model training mode." so i set the training to True. This seems at odds with your suggestion? So i cant get past this “Wrong values in outd” error. I also tchanged it to training=training but i still get the same error: “cell_UNQ_C7 function Decoder.call failed test 1”
I have passed cell_UNQ_C8 and all previous

It probably has a different problem. Could you DM me your UNQ_C6 and UNQ_C7 implementations by clicking my icon and then click Message?

Not hard-coding training (training=True) but feed it flexibly (training = training) in all modules, and then, of course re-running all prior modules, solved the issue for me.