Help needed for C5W4A1 EX-3


Please help me. The code I have written is along the lines as discussed in these posts:

Someone please help me @balaji.ambresh @paulinpaloalto @TMosh

Your error is stating to check codes for masked weight i.e.

add the mask to the scaled tensor.

The boolean mask parameter can be passed in as none or as either padding or look-ahead.

Multiply ((1. - mask) * -1e9) before applying the softmax. 

Perhaps check if you missed that extra tuple as you add to the scaled attention logits, not placing the tuple can cause error.

Regards
DP

2 Likes

Thank you so much Ma’am. It was so nerve-wracking. I spent so many hours scratching my head, only to learn I missed the Reminder right before the code! :sob:
I swear I read instructions properly. Maybe I need some rest…

1 Like

No Issues. It can happen to anyone!!
Take a break whenever stuck in a code for too long. Fresh perspective sometimes catches the bugger hidden in the frustration of not able to resolve issue.

Happy to help!!

Regards
DP

2 Likes