-
Notifications
You must be signed in to change notification settings - Fork 49
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
Dimension out of range (expected to be in range of [-1, 0], but got -2) [HGT] #5
Comments
I found this problem too. |
Sorry, I am not quite sure about the error you encountered. It looks like an error with the formatting of pytorch_geometrics library. |
I also encountered this problem, for both supervised and unsupervised. PubMed dataset |
I got this error,too. And I use the latest version of torch_geometric. I saw the code of HGT 's author who use the version of 1.3.2. But I can't install the dependencies with this version. Could you please help us slove this problem and show your torch_geometric version? |
I think the bug is due to different versions of torch_geometric. |
pytorch 1.4.0
Dimension out of range (expected to be in range of [-1, 0], but got -2)
dataset : freebase
model: HGT
maybe the data format is wrong
Traceback (most recent call last):
File "src/main.py", line 137, in
node_rep, _ = model.forward(node_feature.to(device), node_type.to(device), edge_time.to(device), edge_type.to(device), edge_index.to(device))
File "/home/bopa/project/HNE/Model/HGT/src/model.py", line 170, in forward
meta_xs = gc(meta_xs, node_type, edge_index, edge_type, edge_time)
File "/home/bopa/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/bopa/project/HNE/Model/HGT/src/model.py", line 49, in forward
return self.propagate(edge_index, node_inp=node_inp, node_type=node_type, edge_type=edge_type, edge_time=edge_time)
File "/home/bopa/.local/lib/python3.6/site-packages/torch_geometric/nn/conv/message_passing.py", line 233, in propagate
kwargs)
File "/home/bopa/.local/lib/python3.6/site-packages/torch_geometric/nn/conv/message_passing.py", line 156, in collect
self.set_size(size, dim, data)
File "/home/bopa/.local/lib/python3.6/site-packages/torch_geometric/nn/conv/message_passing.py", line 119, in set_size
elif the_size != src.size(self.node_dim):
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got -2)
The text was updated successfully, but these errors were encountered: