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
61084dfe
Commit
61084dfe
authored
Jan 13, 2018
by
rusty1s
Browse files
bugfix
parent
bbc25706
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
torch_cluster/functions/grid.py
torch_cluster/functions/grid.py
+3
-2
No files found.
torch_cluster/functions/grid.py
View file @
61084dfe
...
@@ -8,8 +8,9 @@ def grid_cluster(position, size, batch=None):
...
@@ -8,8 +8,9 @@ def grid_cluster(position, size, batch=None):
if
batch
is
not
None
:
if
batch
is
not
None
:
batch
=
batch
.
type_as
(
position
)
batch
=
batch
.
type_as
(
position
)
position
=
torch
.
cat
([
position
,
batch
],
dim
=
position
.
dim
()
-
1
)
size
=
torch
.
cat
([
size
.
new
(
1
).
fill_
(
1
),
size
],
dim
=
0
)
size
=
torch
.
cat
([
size
,
size
.
new
(
1
).
fill_
(
1
)],
dim
=
0
)
dim
=
position
.
dim
()
position
=
torch
.
cat
([
batch
.
unsqueeze
(
dim
-
1
),
position
],
dim
=
dim
-
1
)
dim
=
position
.
dim
()
dim
=
position
.
dim
()
...
...
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