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

Perhaps this previous thread will be useful.