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
c20e6b58
Commit
c20e6b58
authored
Mar 28, 2018
by
rusty1s
Browse files
rename
parent
235d586b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
torch_cluster/functions/grid.py
torch_cluster/functions/grid.py
+2
-2
torch_cluster/functions/normalized_cut.py
torch_cluster/functions/normalized_cut.py
+0
-0
torch_cluster/functions/utils/ffi.py
torch_cluster/functions/utils/ffi.py
+1
-1
No files found.
torch_cluster/functions/grid.py
View file @
c20e6b58
...
@@ -2,7 +2,7 @@ from __future__ import division
...
@@ -2,7 +2,7 @@ from __future__ import division
import
torch
import
torch
from
.utils.ffi
import
get_
dynamic
_func
from
.utils.ffi
import
get_
typed
_func
from
.utils.consecutive
import
consecutive
from
.utils.consecutive
import
consecutive
...
@@ -70,7 +70,7 @@ def _grid_cluster(position, size, cluster_size):
...
@@ -70,7 +70,7 @@ def _grid_cluster(position, size, cluster_size):
cluster
=
cluster_size
.
new
(
torch
.
Size
(
list
(
position
.
size
())[:
-
1
]))
cluster
=
cluster_size
.
new
(
torch
.
Size
(
list
(
position
.
size
())[:
-
1
]))
cluster
=
cluster
.
unsqueeze
(
dim
=-
1
)
cluster
=
cluster
.
unsqueeze
(
dim
=-
1
)
func
=
get_
dynamic
_func
(
'grid'
,
position
)
func
=
get_
typed
_func
(
'grid'
,
position
)
func
(
C
,
cluster
,
position
,
size
,
cluster_size
)
func
(
C
,
cluster
,
position
,
size
,
cluster_size
)
cluster
=
cluster
.
squeeze
(
dim
=-
1
)
cluster
=
cluster
.
squeeze
(
dim
=-
1
)
...
...
torch_cluster/functions/
utils/
normalized_cut.py
→
torch_cluster/functions/normalized_cut.py
View file @
c20e6b58
File moved
torch_cluster/functions/utils/ffi.py
View file @
c20e6b58
...
@@ -6,7 +6,7 @@ def get_func(name, tensor):
...
@@ -6,7 +6,7 @@ def get_func(name, tensor):
return
getattr
(
ffi
,
'cluster_{}{}'
.
format
(
name
,
cuda
))
return
getattr
(
ffi
,
'cluster_{}{}'
.
format
(
name
,
cuda
))
def
get_
dynamic
_func
(
name
,
tensor
):
def
get_
typed
_func
(
name
,
tensor
):
typename
=
type
(
tensor
).
__name__
.
replace
(
'Tensor'
,
''
)
typename
=
type
(
tensor
).
__name__
.
replace
(
'Tensor'
,
''
)
cuda
=
'cuda_'
if
tensor
.
is_cuda
else
''
cuda
=
'cuda_'
if
tensor
.
is_cuda
else
''
return
getattr
(
ffi
,
'cluster_{}_{}{}'
.
format
(
name
,
cuda
,
typename
))
return
getattr
(
ffi
,
'cluster_{}_{}{}'
.
format
(
name
,
cuda
,
typename
))
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