WeeK 4 Exercise 6 DecoderLayer Problem


When I test the DecoderLayer coding, it returns the following error message:


Please don’t post your code on the discussion forum. That’s not allowed by the course Honor Code. Please edit your message and remove the code, thanks.

In self.mha2, the first argument is out1, not enc_output. Otherwise you’re never using out1 at all.

1 Like

Thank you so much. I will do that.

Hi TMosh, I followed your suggestion. But I still got the same error.

In self.mha2 try using the following set of inputs (out1, enc_output, enc_output + the rest). It should fix the issue.

1 Like

Thank you so much. It works now.

I try to use this set of inputs but i got the same error : AssertionError: Wrong values in out