Hello,
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:
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.
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
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.