ValueError: Both 'src' and 'index' must be on the same device (got 'cpu' and 'cuda:1')
xx-m opened this issue · 1 comments
xx-m commented
This bug occurs when I do node classification experiments on the dataset ogbn-proteins.
Traceback (most recent call last):
File "/NodeFormer/main-batch.py", line 138, in
edge_index_i, _ = subgraph(idx_i, adjs[0], num_nodes=n, relabel_nodes=True)
File "/python3.10/site-packages/torch_geometric/utils/subgraph.py", line 104, in subgraph
edge_index, _ = map_index(
File "/python3.10/site-packages/torch_geometric/utils/map.py", line 63, in map_index
raise ValueError(f"Both 'src' and 'index' must be on the same device "
qitianwu commented
Seems you did not use the correct version of the packages or datasets