Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于代码中y的疑问 #213

Open
nhw649 opened this issue Jun 3, 2023 · 4 comments
Open

关于代码中y的疑问 #213

nhw649 opened this issue Jun 3, 2023 · 4 comments

Comments

@nhw649
Copy link

nhw649 commented Jun 3, 2023

你好,我想知道torch_vertex.py 146行,y代表什么,有什么作用呢?

if self.r > 1:
    y = F.avg_pool2d(x, kernel_size=self.r, stride=self.r)  # [B, out_dim, H/r, W/r]
    y = y.reshape(B, C, -1, 1).contiguous()  # [B, out_dim, H/r*W/r, 1]
@iamhankai
Copy link
Member

y是为了减少节点个数,从而减少计算邻接矩阵时的计算量。

@nhw649
Copy link
Author

nhw649 commented Jun 4, 2023

y是为了减少节点个数,从而减少计算邻接矩阵时的计算量。

谢谢回答!

@Joazs
Copy link

Joazs commented Sep 2, 2023

请问一下ViG-Ti在224x224下的FPS怎么样?相比于CNN、Transformer方法比较如何?

@yijie-0
Copy link

yijie-0 commented Nov 30, 2023

作者您好,您的论文非常有创意!但我想请问一下:
针对pyramid vig,如果r>1,下采样图会包含更大的感受野,而图更新来自特征图与下采样图(采样节点)的特征差值,这是否会带来除了减少计算外的某些好处?比如reduce_ratio元素全>1时,会不会比部分元素取1带来准确率的提升

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants