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

how absolute position embedding is applied? #188

Open
zhouzhengbo2022 opened this issue Mar 22, 2023 · 1 comment
Open

how absolute position embedding is applied? #188

zhouzhengbo2022 opened this issue Mar 22, 2023 · 1 comment

Comments

@zhouzhengbo2022
Copy link

Thanks author for this great project. I have a question about how absolute position embedding is applied as shown in the code

self.pos_embed = nn.Parameter(torch.zeros(1, channels, 14, 14))

https://github.com/huawei-noah/Efficient-AI-Backbones/blob/master/vig_pytorch/vig.py#L110

since it is initialized as zero and have not updated during the training.

@iamhankai
Copy link
Member

It is used in

x = self.stem(inputs) + self.pos_embed

It will be updated during training.

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

2 participants