Course 5, week 4, transformer, UNQ_C6

I did everything as instructed still i am getting this error:
“Wrong values in attn_w_b1. Check the call to self.mha1”
Any help would be appreciated. Thanks!

What code did you add to the DecoderLayer()?

heres my code:
{mentor edit: code removed}

That code looks fine.
Please download your entire notebook and send it to me.

It appears that your code for the create_look_ahead_mask() function is incorrect.
Your code has “mask = 1 - tf.linalg…”
The “1 -” is not correct.
Did you modify this function? You should not have.

This is why the “DecoderLayer_test” fails - because it calls the create_look_ahead_mask() function, which it expects you to not modify.

Really appreciate your help. Thanks a lot!!