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

Severe BUG when initializing parameters!!! #11

Open
RongfanLi98 opened this issue Dec 16, 2021 · 1 comment
Open

Severe BUG when initializing parameters!!! #11

RongfanLi98 opened this issue Dec 16, 2021 · 1 comment

Comments

@RongfanLi98
Copy link

RongfanLi98 commented Dec 16, 2021

Whenever you use nn.Parameter(torch.Tensor(...)) , it will sometimes include nan value and results in training failure. In case someone skip the nn.init.xavier_uniform_, the right way to initialize parameter is to use nn.Parameter(torch.rand(...)) or nn.Parameter(torch.randn(...)). For example, at GAT.py.

See also: https://discuss.pytorch.org/t/nn-parameter-contains-nan-when-initializing/44559

@jiangxinke
Copy link

thank you!

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