hi @Ernest_Divine
check the below thread if it helps you debug your codes.
One of the issue clearly seen in your code is you have used training for block 2, which you are not suppose to.
Also check your output code and the padding mask recall to the output. if they are correctly recalled
in case you still not able to find, let me know.
Regards
DP