External-Attention-pytorch
External-Attention-pytorch copied to clipboard
Maybe an error in SKAttention?
首先感谢您的工作。
attention_weughts=self.softmax(attention_weughts)#k,bs,channel,1,1
此时attention_weughts 的shape 为 k,bs,channel,1,1,而该softmax应该是 k 这个维度进行。
因此 SKAttention 中 self.softmax=nn.Softmax(dim=1)
是否要改为 self.softmax=nn.Softmax(dim=0)
@xmu-xiaoma666 期待您的回复
首先感谢您的工作。
attention_weughts=self.softmax(attention_weughts)#k,bs,channel,1,1
此时attention_weughts 的shape 为 k,bs,channel,1,1,而该softmax应该是 k 这个维度进行。 因此 SKAttention 中self.softmax=nn.Softmax(dim=1)
是否要改为self.softmax=nn.Softmax(dim=0)
@xmu-xiaoma666 期待您的回复
对的,确实写错了,已修改