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
fa36a835
Commit
fa36a835
authored
Apr 26, 2018
by
rusty1s
Browse files
typo
parent
a315a06d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
3 deletions
+2
-3
test/test_graclus.py
test/test_graclus.py
+1
-1
test/test_grid.py
test/test_grid.py
+1
-1
test/utils.py
test/utils.py
+0
-1
No files found.
test/test_graclus.py
View file @
fa36a835
...
@@ -41,7 +41,7 @@ def assert_correct_graclus(row, col, cluster):
...
@@ -41,7 +41,7 @@ def assert_correct_graclus(row, col, cluster):
@
pytest
.
mark
.
parametrize
(
'test,dtype,device'
,
product
(
tests
,
dtypes
,
devices
))
@
pytest
.
mark
.
parametrize
(
'test,dtype,device'
,
product
(
tests
,
dtypes
,
devices
))
def
test_graclus_cluster
_cpu
(
test
,
dtype
,
device
):
def
test_graclus_cluster
(
test
,
dtype
,
device
):
row
=
tensor
(
test
[
'row'
],
torch
.
long
,
device
)
row
=
tensor
(
test
[
'row'
],
torch
.
long
,
device
)
col
=
tensor
(
test
[
'col'
],
torch
.
long
,
device
)
col
=
tensor
(
test
[
'col'
],
torch
.
long
,
device
)
weight
=
tensor
(
test
.
get
(
'weight'
),
dtype
,
device
)
weight
=
tensor
(
test
.
get
(
'weight'
),
dtype
,
device
)
...
...
test/test_grid.py
View file @
fa36a835
...
@@ -27,7 +27,7 @@ tests = [{
...
@@ -27,7 +27,7 @@ tests = [{
@
pytest
.
mark
.
parametrize
(
'test,dtype,device'
,
product
(
tests
,
dtypes
,
devices
))
@
pytest
.
mark
.
parametrize
(
'test,dtype,device'
,
product
(
tests
,
dtypes
,
devices
))
def
test_grid_cluster
_cpu
(
test
,
dtype
,
device
):
def
test_grid_cluster
(
test
,
dtype
,
device
):
pos
=
tensor
(
test
[
'pos'
],
dtype
,
device
)
pos
=
tensor
(
test
[
'pos'
],
dtype
,
device
)
size
=
tensor
(
test
[
'size'
],
dtype
,
device
)
size
=
tensor
(
test
[
'size'
],
dtype
,
device
)
start
=
tensor
(
test
.
get
(
'start'
),
dtype
,
device
)
start
=
tensor
(
test
.
get
(
'start'
),
dtype
,
device
)
...
...
test/utils.py
View file @
fa36a835
...
@@ -5,7 +5,6 @@ dtypes = get_all_dtypes()
...
@@ -5,7 +5,6 @@ dtypes = get_all_dtypes()
dtypes
.
remove
(
torch
.
half
)
dtypes
.
remove
(
torch
.
half
)
devices
=
[
torch
.
device
(
'cpu'
)]
devices
=
[
torch
.
device
(
'cpu'
)]
if
torch
.
cuda
.
is_available
():
if
torch
.
cuda
.
is_available
():
devices
+=
[
torch
.
device
(
'cuda:{}'
.
format
(
torch
.
cuda
.
current_device
()))]
devices
+=
[
torch
.
device
(
'cuda:{}'
.
format
(
torch
.
cuda
.
current_device
()))]
...
...
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