Closed wqhIris closed 2 years ago
You can just take the certain row of the self-attention matrix softmax(QK)
and get an HWx1
matrix. Then reshaping it into HxW
will be ok. For example, if you want to take the central pixel's attention map, you can choose the (HW/2)
th row of the self-attention matrix softmax(QK)
.
Got it, thank you very much!
Thank you for your nice work! I am wondering how to get the attention map of the picked point, could you give a simple introduction?