Course 5 Week 4 Ex 5 & 7 : Wrong values for both full Encoder and full Decoder

For both the Full Encoder (Ex 5) and the Full Decoder (Ex 7) the function that I implemented so far gives the error “Wrong values”:
---> 26 [ 0.2627198, -1.6140151, 0.2212624 , 1.130033 ]]]), "Wrong values"

Both the EncoderLayer and the DecoderLayer that are used in these functions have passed all the tests, so nothing should be wrong with those.

I have been troubleshooting for a while now. Can someone maybe give me some hints on possible errors in my code? Maybe a certain part where a lot of people make mistakes? Tomorrow my subscription to the DL Specialization will end, and these errors are the last things I need to fix.

Thanks in advance!

Just in case anyone who has the same problem, check if you use python function sum(iterable, start) in skip connections, because sum(a, b) != a + b.

Wich one should we use?

You can add two tensors element-wise via + operator.

Figured this out. Sheesh!, @Nim @edwardyu, check what you are passing to the square root function. You have to pass the embedding dimension to the function. This assignment requires a lot of re-thinking on part of whoever has designed this. :slight_smile: