I’m getting an error of “Wrong unmasked weights”. But don’t know where I did wrong.
I used:
dk = tf.shape(k)[-2]
(1 - mask) * (-1.0e9)
tf.nn.softmax
tf.matmul
Can someone help? Thanks!
Please click my name and message your function code as text.
The problem is with calculating matmul_qk
. Pay attention to the transpose operation in Q K^T
It works! thank you!