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
80dea956
Unverified
Commit
80dea956
authored
Sep 09, 2021
by
g-morishita
Committed by
GitHub
Sep 09, 2021
Browse files
improve infererence the number of nodes (#112)
parent
3521c0d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torch_cluster/rw.py
torch_cluster/rw.py
+1
-1
No files found.
torch_cluster/rw.py
View file @
80dea956
...
...
@@ -32,7 +32,7 @@ def random_walk(row: Tensor, col: Tensor, start: Tensor, walk_length: int,
:rtype: :class:`LongTensor`
"""
if
num_nodes
is
None
:
num_nodes
=
max
(
int
(
row
.
max
()),
int
(
col
.
max
()))
+
1
num_nodes
=
max
(
int
(
row
.
max
()),
int
(
col
.
max
())
,
int
(
start
.
max
())
)
+
1
if
coalesced
:
perm
=
torch
.
argsort
(
row
*
num_nodes
+
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