x_mask and source_mask is None
spacycoder opened this issue · 2 comments
spacycoder commented
Hi, great work!
Quick question, why do you assert that x_mask and source_mask should be None
here:
Shouldn't the masks be applied to the qkv tensors? The rest of the code seems to allow for x_mask and source_mask to be available
wyf2020 commented
Thank you for your question! Currently, our code only support padding mask and will crop image by padding mask before transformer. If you want to use mask of generalized shape, you can pass the mask into here and modify the parameter of F.scaled_dot_product_attention or add a manually mask like LoFTR. We will provide config choice for this operation soon. For more detailed explanation, you can also have a look at this issue.
spacycoder commented
OK, thanks!