You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
作者您好,感谢您的工作。
在文章中我看到LE(.) 表示 local enhancing component of MTA for value V by a depth-wise convolution. 对应代码中为 v1 = v1 + self.local_conv1(v1.transpose(1, 2).reshape(B, -1, C//2). transpose(1, 2).view(B,C//2, H//self.sr_ratio, W//self.sr_ratio)).\ view(B, C//2, -1).view(B, self.num_heads//2, C // self.num_heads, -1).transpose(-1, -2)
SSA.py 中line 142 and 143 的代码 x = (attn @ v).transpose(1, 2).reshape(B, N, C) + self.local_conv(v.transpose(1, 2).reshape(B, N, C). transpose(1, 2).view(B,C, H, W)).view(B, C, N).transpose(1, 2)
表示在最后一个stage中enhanced V 直接与注意力计算后的x相加,而不是像前几个stage一样与V相加后再计算注意力,这是出于怎样的考虑?论文里并没有具体介绍。
希望您可以解答这两个问题,感谢
The text was updated successfully, but these errors were encountered:
作者您好,感谢您的工作。
在文章中我看到LE(.) 表示 local enhancing component of MTA for value V by a depth-wise convolution. 对应代码中为
v1 = v1 + self.local_conv1(v1.transpose(1, 2).reshape(B, -1, C//2). transpose(1, 2).view(B,C//2, H//self.sr_ratio, W//self.sr_ratio)).\ view(B, C//2, -1).view(B, self.num_heads//2, C // self.num_heads, -1).transpose(-1, -2)
关于这部分我有两个疑问:
x = (attn @ v).transpose(1, 2).reshape(B, N, C) + self.local_conv(v.transpose(1, 2).reshape(B, N, C). transpose(1, 2).view(B,C, H, W)).view(B, C, N).transpose(1, 2)
表示在最后一个stage中enhanced V 直接与注意力计算后的x相加,而不是像前几个stage一样与V相加后再计算注意力,这是出于怎样的考虑?论文里并没有具体介绍。
希望您可以解答这两个问题,感谢
The text was updated successfully, but these errors were encountered: