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
5f1939fd
Commit
5f1939fd
authored
Dec 05, 2020
by
Duc
Browse files
added a test for vector ratio
parent
01a51d47
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 @
5f1939fd
...
@@ -27,6 +27,9 @@ def test_fps(dtype, device):
...
@@ -27,6 +27,9 @@ def test_fps(dtype, device):
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
]
out
=
fps
(
x
,
batch
,
ratio
=
torch
.
tensor
([
0.5
,
0.5
]),
random_start
=
False
)
assert
out
.
tolist
()
==
[
0
,
2
,
4
,
6
]
out
=
fps
(
x
,
ratio
=
torch
.
tensor
(
0.5
),
random_start
=
False
)
out
=
fps
(
x
,
ratio
=
torch
.
tensor
(
0.5
),
random_start
=
False
)
assert
out
.
sort
()[
0
].
tolist
()
==
[
0
,
5
,
6
,
7
]
assert
out
.
sort
()[
0
].
tolist
()
==
[
0
,
5
,
6
,
7
]
...
...
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