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

Some datasets have not come with node labels #6

Open
LvShengZe903 opened this issue Jul 7, 2020 · 2 comments
Open

Some datasets have not come with node labels #6

LvShengZe903 opened this issue Jul 7, 2020 · 2 comments

Comments

@LvShengZe903
Copy link

Some datasets with both node lables and graph lables can run the code successfully, but there are some datasets which have not come with node labels, when I run the code, exist a bug.
Traceback (most recent call last):
File "main.py", line 306, in
run_exp_single_test()
File "main.py", line 301, in run_exp_single_test
run_exp_lib([('REDDIT-MULTI-12K', 'data', 'ResGFN')])
File "main.py", line 189, in run_exp_lib
logger=logger)
File "/home/lvshengze/gfn-master/train_eval.py", line 110, in cross_validation_with_val_set
model, optimizer, train_loader, device)
File "/home/lvshengze/gfn-master/train_eval.py", line 198, in train
out = model(data)
File "/opt/anaconda3/envs/lsz/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/lvshengze/gfn-master/res_gcn.py", line 117, in forward
return self.forward_BNConvReLU(x, edge_index, batch, xg)
File "/home/lvshengze/gfn-master/res_gcn.py", line 140, in forward_BNConvReLU
x = self.bn_feat(x)
File "/opt/anaconda3/envs/lsz/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/opt/anaconda3/envs/lsz/lib/python3.6/site-packages/torch/nn/modules/batchnorm.py", line 85, in forward
self._check_input_dim(input)
File "/opt/anaconda3/envs/lsz/lib/python3.6/site-packages/torch/nn/modules/batchnorm.py", line 177, in _check_input_dim
if input.dim() != 2 and input.dim() != 3:
AttributeError: 'NoneType' object has no attribute 'dim'

I have no idea to use torch_geometric.transforms.Constant or torch_geometric.transforms.OneHotDegree to add node labels to the datasets.
Sincerely looking forward to your reply.

@Waterpine
Copy link
Collaborator

I apologize for my delayed response since I am busy recently. It seems that the latest version of PyTorch does not support our code. Could you use pytorch 1.0? because when we implement this project, the version PyTorch and torch_geometric are all very old. Thanks!

@LvShengZe903
Copy link
Author

I apologize for my delayed response since I am busy recently. It seems that the latest version of PyTorch does not support our code. Could you use pytorch 1.0? because when we implement this project, the version PyTorch and torch_geometric are all very old. Thanks!

I am really appreciate for your enduring reply. Thank you very much.

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