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 weight of embedding padding_idx=0 is not zero #41
Comments
Yes. I am working on future model usage therefore I noticed the bug in here. when I modifying the edge feature, there may be 0 embedding index which exists in the edge feature before the range of mask. (e.g. no covalent bond between two atoms) |
If I understand correctly, it might be solved by adding an index-shift. |
I don't understand what is index-shift, haha.
This method solved the problem anyway. |
Close this issue due to inactive. Feel free to raise a new one or reopen this one for any further question. |
Graphormer/graphormer/model.py
Line 20 in 740e6ff
When you re-initialize the weight of embedding, the weight of 0th index is also initialized by normal distribution, whose padding vector in the feature input will be non-zero. It should be wrong.
The text was updated successfully, but these errors were encountered: