Dear Jpeg729,
Yeah, My goal is to use the masked embeddings sequence to calculate the cos similarity grid.
So that the in the interaction grid S(x_i, y_j) will have 0s in (PAD, PAD) positions.
Maybe I should apply a 2D mask on the interaction grid S? by multiplying for example a 2D mask:
1,1,1,0,0
1,1,1,0,0
0,0,0,0,0
But it’s more complicated and always have the problem of S * S_mask problem with non differentiable mask…