Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-cluster
Commits
691691f9
Commit
691691f9
authored
Apr 26, 2018
by
rusty1s
Browse files
requires grad fix
parent
1edd387e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
torch_cluster/graclus.py
torch_cluster/graclus.py
+2
-1
No files found.
torch_cluster/graclus.py
View file @
691691f9
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment