Skip to content

Commit

Permalink
Fix RuntimeError in adapted pyg example
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelange committed Dec 1, 2022
1 parent 98597f3 commit f4702c9
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Adapted from https://github.com/pyg-team/pytorch_geometric/blob/master/examples
# /multi_gpu/distributed_sampling.py.
# Adapted from https://github.com/pyg-team/pytorch_geometric/blob/2.1.0/examples/multi_gpu/distributed_sampling.py

import os
import argparse
Expand Down Expand Up @@ -46,7 +45,7 @@ def test(self, x_all, subgraph_loader):
for batch_size, n_id, adj in subgraph_loader:

edge_index, _, size = adj
x = x_all[n_id].to(train.torch.get_device())
x = x_all[n_id]
x_target = x[: size[1]]
x = self.convs[i]((x, x_target), edge_index)
if i != self.num_layers - 1:
Expand Down

0 comments on commit f4702c9

Please sign in to comment.