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

An intialization promblem of fnn.embeddings with padding_idx #1

Open
CConory opened this issue Nov 23, 2023 · 0 comments
Open

An intialization promblem of fnn.embeddings with padding_idx #1

CConory opened this issue Nov 23, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@CConory
Copy link

CConory commented Nov 23, 2023

🐛 Describe the bug

if module.padding_idx is not None:
     module.weight.data[module.padding_idx].zero_()

When module.padding_idx exist, the weight of embedding will initial to 0 since the padding_idx is incorrectly index to the fusion_B dimension.

Versions / Dependencies

Pytorch 2.0

@CConory CConory added the bug Something isn't working label Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant