W4 Exercise 7: Decoder - AssertionError: Wrong values in outd

That you are using self.embedding(…).

yes, I have self.embedding(x)

That you are using tf.math.sqrt(…), and that you’re using the correct tf.cast() arguments.

I think so: x *= tf.math.sqrt(tf.cast(self.embedding_dim, tf.float32))

That you are using the correct slicing in the call to self.pos_encoding(…).

From the instructions, I understood pos_encoding[:, seq_len, :]

That you are using training=training in the self.dropout(…).

Confirmed. I used training=training in all lines with self.dropout in Ex 6 and 7. In Ex6, I also used it in the calls of self.mha1 and self.mha2.

There are a lot of arguments for the self.dec_layers(…). Be sure you have the correct masks in the correct order.

Yes, I double-checked against the signature of the call method implemented in Exercise 6: call(self, x, enc_output, training, look_ahead_mask, padding_mask) and wrote self.dec_layers[i](x, enc_output, training, look_ahead_mask, padding_mask) in Ex.7