rayleizhu / BiFormer

[CVPR 2023] Official code release of our paper "BiFormer: Vision Transformer with Bi-Level Routing Attention"
https://arxiv.org/abs/2303.08810
MIT License
461 stars 36 forks source link

block问题 #25

Closed Caipengzhou closed 1 year ago

Caipengzhou commented 1 year ago

作者您好,在论文中topk = 1,4,16,S^23,也就是说,在stage4用的topk=S^23,但是在BiFormer tiny代码里面的stage:4 的topk=-2,用的AttentionLePE,并不是BiLevelRoutingAttention。 问题一:为什么要在stage:4用AttentionLePE呢?为什么不全部用BiLevelRoutingAttention呢? 问题二:S^23有什么特殊意义吗?

rayleizhu commented 1 year ago

问题一:为什么要在stage:4用AttentionLePE呢?为什么不全部用BiLevelRoutingAttention呢?

因为最后一个stage分辨率太小(7*7), 没必要再分块了

问题二:S^23有什么特殊意义吗?

image