Skip to content

Commit 5e07dd3

Browse files
committed
fix a typo in data.Graph.split()
1 parent a1df0a2 commit 5e07dd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchdrug/data/graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def split(self, node2graph):
334334
edge_index = edge2graph.argsort()
335335
edge_index = edge_index[edge_mask[edge_index]]
336336

337-
prepend = -torch.tensor([-1], device=self.device)
337+
prepend = torch.tensor([-1], device=self.device)
338338
is_first_node = torch.diff(node2graph[index], prepend=prepend) > 0
339339
graph_index = self.node2graph[index[is_first_node]]
340340

0 commit comments

Comments
 (0)