Hi @Erika_Hall
If you have the same error output as the post creator, then the issue is the way you are recalling logits.
Remember.
remember (64,14) is the vocab_size and unit and 256 is a batch of sentences used to translate English to Portuguese.
So when the logits shape expected output is (64, 15, 12000)
12,000 is the size of the vocabulary since you expect it to compute the logits for every possible word in the vocabulary,
This mean vocab_size for context, right-sided translation and logits is same, so this is not issue with your codes
but units don’t match for contexts but do match for right-sighted translation as well as logits, so for the code line
The dense layer with logsoftmax activation in the class Decoder(tf.keras.layers.Layer):
requires you to recall units as vocab_size as it is mentioned before the grader cell for this dense layer: This one should have the same number of units as the size of the vocabulary since you expect it to compute the logits for every possible word in the vocabulary.
Regards
DP