C4W2_Assignment_Decoder Layer

Decoder layer
When establishing decoding layer which is meant to be similar the encoding layer I keep getting this mistake.
Any clarification will be appriceated.

{@tmosh edit: code removed}

Hi @Deniz_Hallacoglu_UK,

consider checking out the Additional Hints of Exercise 2, they can offer an insight for the mistake you are getting.

Hi @Deniz_Hallacoglu_UK

You’re not passing the argument return_attention_scores=? for the first MultiHeadAttention and also for the second. This is the reason for your mistake.

Please remove the first image of your solution since it’s against the rules to post your solutions.


Thanks for the answers

Finally I understand what’s arvyzukai talking about! Based on mha at EncoderLayer, you need to set “return_attention_scores” correctly for both MultiHeadAttention.

1 Like