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

Assert Error #52

Open
tanjia123456 opened this issue Dec 7, 2020 · 2 comments
Open

Assert Error #52

tanjia123456 opened this issue Dec 7, 2020 · 2 comments

Comments

@tanjia123456
Copy link

Hello,
I use my own datasets, and sparseGAT. Now I have met an Assert Error in layers:
Traceback (most recent call last): File "F:/googledownload/pyGAT-master/train_data.py", line 157, in <module> loss_values.append(train(epoch)) File "F:/googledownload/pyGAT-master/train_data.py", line 108, in train output=model(x_train[i], adj_index) File "D:\anaconda3.4\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__ result = self.forward(*input, **kwargs) File "F:\googledownload\pyGAT-master\models_data.py", line 49, in forward x = torch.cat([att(x, adj) for att in self.attentions], dim=1) File "F:\googledownload\pyGAT-master\models_data.py", line 49, in <listcomp> x = torch.cat([att(x, adj) for att in self.attentions], dim=1) File "D:\anaconda3.4\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__ result = self.forward(*input, **kwargs) File "F:\googledownload\pyGAT-master\layers_data.py", line 164, in forward assert not torch.isnan(h_prime).any() AssertionError

Maybe there is nan value, But I don't know how to solve it.

@Yujun-Yan
Copy link

I have the same problem with sparse GAT. Even stacking more layers in the cora/citeseer dataset will lead to this error. It seems nan is generated during the process

@nxchenbnu
Copy link

I suggest you read Layer.py carefully, especially in its adj/edge matrix/numpy. It may occur due to the wrong use of dataset.

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

3 participants