We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9050e3a commit 05f430eCopy full SHA for 05f430e
torch_geometric/utils/_to_dense_adj.py
@@ -70,7 +70,7 @@ def to_dense_adj(
70
perm = batch.argsort()
71
batch = batch[perm]
72
new_index_map = torch.empty_like(perm)
73
- new_index_map[perm] = torch.arange(perm.size(0))
+ new_index_map[perm] = torch.arange(perm.size(0), device=perm.device)
74
edge_index = new_index_map[edge_index]
75
76
one = batch.new_ones(batch.size(0))
0 commit comments