W4a1 unq_c5 Encoder

Hello,

I am getting “AssertionError: Wrong values case 1” error for this assignment.
I passed the UNQ_C4 assignment.
I applied the square root of the embedding dimension, self.pos_encoding [:, :seq_len, :] and training for dropout.
There is nothing to code aside from these.

What could be the reason, could you please help ?

Hey @Hasan_Resul_Cesur,
Welcome to the community. It’s hard to find the exact issue without taking an exact look at your code for the Encoder class. Additionally, it might be possible that your first 4 functions have passed the test cases, but still might have an error. A common issue could be to use the global variables inside the functions at places where they are not intended to, or to hard-code some variables to pass the corresponding test cases.

Can you please DM me your code so that I can find the exact issue? Make sure to not post it publicly since it is strictly against the community guidelines. Just click on my name, and select “Message”.

Regards,
Elemento

Hello,

I found the problem.
“self.enc_layers” definition inside the “init” part is a list comprehension. I thought it’s a fixed size list. So the problem was with the indexing while using “self.enc_layers” later on.

Thank you @Elemento for your consideration and help.

Hey @Hasan_Resul_Cesur,
I am glad you were able to find the issue.

Regards,
Elemento