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
be87cc98
Commit
be87cc98
authored
Dec 05, 2020
by
Duc
Browse files
added simple test
parent
2e57b128
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
test/test_fps.py
test/test_fps.py
+3
-0
No files found.
test/test_fps.py
View file @
be87cc98
...
@@ -21,6 +21,9 @@ def test_fps(dtype, device):
...
@@ -21,6 +21,9 @@ def test_fps(dtype, device):
],
dtype
,
device
)
],
dtype
,
device
)
batch
=
tensor
([
0
,
0
,
0
,
0
,
1
,
1
,
1
,
1
],
torch
.
long
,
device
)
batch
=
tensor
([
0
,
0
,
0
,
0
,
1
,
1
,
1
,
1
],
torch
.
long
,
device
)
out
=
fps
(
x
,
batch
,
ratio
=
0.5
,
random_start
=
False
)
assert
out
.
tolist
()
==
[
0
,
2
,
4
,
6
]
out
=
fps
(
x
,
batch
,
ratio
=
torch
.
tensor
(
0.5
),
random_start
=
False
)
out
=
fps
(
x
,
batch
,
ratio
=
torch
.
tensor
(
0.5
),
random_start
=
False
)
assert
out
.
tolist
()
==
[
0
,
2
,
4
,
6
]
assert
out
.
tolist
()
==
[
0
,
2
,
4
,
6
]
...
...
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