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

The implementation of Isotropic architecture #130

Closed
buptxiaofeng opened this issue Jul 30, 2022 · 6 comments
Closed

The implementation of Isotropic architecture #130

buptxiaofeng opened this issue Jul 30, 2022 · 6 comments

Comments

@buptxiaofeng
Copy link

Hi, thanks for sharing this impressive work. The paper mentioned two architectures, Isotropic one and pyramid one. I noticed that in the code, this is a reduce_ratios, and this reduce_ratios are used by a avg_pooling operation to calculate before building the graph. I am wondering whether all I need to do is setting this reduce_ratios to [1,1,1,1] if I want to implement the Isotropic architecture. Thanks.

self.n_blocks = sum(blocks)
channels = opt.channels
reduce_ratios = [4, 2, 1, 1]
dpr = [x.item() for x in torch.linspace(0, drop_path, self.n_blocks)]
num_knn = [int(x.item()) for x in torch.linspace(k, k, self.n_blocks)]

@iamhankai
Copy link
Member

Yes, set this reduce_ratios to [1,1,1,1].

@HaniItani
Copy link

Hello @iamhankai,

Shouldn't the downsampling be also disabled for the isotropic architecture so that the number of tokens is constant throughout the model?

@iamhankai
Copy link
Member

Yes, it doesn't need downsampling in the isotropic architecture.

@0xf21
Copy link

0xf21 commented Nov 3, 2022

for i in range(len(blocks)):

        if i > 0:

            self.backbone.append(Downsample(channels[i-1], channels[i]))

To implement the Isotropic architecture, I need to do is setting reduce_ratios to [1,1,1,1] and removing this Downsample, right?

@iamhankai
Copy link
Member

Yes. The Isotropic code will be released soon.

@iamhankai
Copy link
Member

Yes. The Isotropic code will be released soon.

已发布isotropic ViG的代码:https://github.com/huawei-noah/Efficient-AI-Backbones/tree/master/vig_pytorch

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