DLS 5, Week4, Exercise C7 "Wrong values in outd when training=True and use padding mask"

Is the unit test for C7 okay? cause my decoder layer (C6) get passed but in C7 I get
----> 2 Decoder_test(Decoder, create_look_ahead_mask, create_padding_mask)

~/work/W4A1/public_tests.py in Decoder_test(target, create_look_ahead_mask, create_padding_mask)
236 outd, att_weights = decoderk(x, encoderq_output, True, look_ahead_mask, create_padding_mask(x))
→ 237 assert np.allclose(outd[1, 1], [-0.0250004, 0.50791883, -1.5877104, 1.1047921]), “Wrong values in outd when training=True and use padding mask”
239 print(“\033[92mAll tests passed”)

AssertionError: Wrong values in outd when training=True and use padding mask

1 Like

Perhaps this previous thread will be useful.

Yes, I’ve seen that before. But my pos_encoding is correct and other parts are the same as he has mentioned.

I’m facing the same issue, Please solve this bug. @staff @TMosh

I do not think there is a problem with the assignment.

There are quite a few places in this assignment where subtle errors in one function will trip an assert in another.

Please download your notebook ipynb file and send it to me via a private message. I’ll review it and provide comments.

No thanks, Dear My error was in coding. And it’s solved by doing some changes.

Thanks for cooperating.