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
79f67548
Commit
79f67548
authored
Feb 12, 2019
by
rusty1s
Browse files
mask
parent
7391824f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
torch_cluster/radius.py
torch_cluster/radius.py
+2
-3
No files found.
torch_cluster/radius.py
View file @
79f67548
...
...
@@ -69,9 +69,8 @@ def radius(x, y, r, batch_x=None, batch_y=None, max_num_neighbors=32):
col
=
[
torch
.
tensor
(
c
)
for
c
in
col
]
row
=
[
torch
.
full_like
(
c
,
i
)
for
i
,
c
in
enumerate
(
col
)]
row
,
col
=
torch
.
cat
(
row
,
dim
=
0
),
torch
.
cat
(
col
,
dim
=
0
)
row
=
row
[
col
<
tree
.
n
]
col
=
col
[
col
<
tree
.
n
]
return
torch
.
stack
([
row
,
col
],
dim
=
0
)
mask
=
col
<
tree
.
n
return
torch
.
stack
([
row
[
mask
],
col
[
mask
]],
dim
=
0
)
def
radius_graph
(
x
,
r
,
batch
=
None
,
loop
=
False
,
max_num_neighbors
=
32
):
...
...
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