Commit 5f1939fd authored by Duc's avatar Duc
Browse files

added a test for vector ratio

parent 01a51d47
......@@ -27,6 +27,9 @@ def test_fps(dtype, device):
out = fps(x, batch, ratio=torch.tensor(0.5), random_start=False)
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)
assert out.sort()[0].tolist() == [0, 5, 6, 7]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment