Commit 691691f9 authored by rusty1s's avatar rusty1s
Browse files

requires grad fix

parent 1edd387e
...@@ -20,7 +20,8 @@ def graclus_cluster(row, col, weight=None, num_nodes=None): ...@@ -20,7 +20,8 @@ def graclus_cluster(row, col, weight=None, num_nodes=None):
>>> weight = torch.Tensor([1, 1, 1, 1]) >>> weight = torch.Tensor([1, 1, 1, 1])
>>> cluster = graclus_cluster(row, col, weight) >>> cluster = graclus_cluster(row, col, weight)
""" """
num_nodes = row.max() + 1 if num_nodes is None else num_nodes
num_nodes = row.max().item() + 1 if num_nodes is None else num_nodes
if row.is_cuda: # pragma: no cover if row.is_cuda: # pragma: no cover
row, col = sort_row(row, col) row, col = sort_row(row, col)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment