Commit 1f2c3c31 authored by rusty1s's avatar rusty1s
Browse files

assert

parent c11f343b
...@@ -29,6 +29,7 @@ def fps(x, batch=None, ratio=0.5, random_start=True): ...@@ -29,6 +29,7 @@ def fps(x, batch=None, ratio=0.5, random_start=True):
assert x.is_cuda assert x.is_cuda
assert x.dim() <= 2 and batch.dim() == 1 assert x.dim() <= 2 and batch.dim() == 1
assert x.size(0) == batch.size(0) assert x.size(0) == batch.size(0)
assert ratio > 0 and ratio < 1
x = x.view(-1, 1) if x.dim() == 1 else x x = x.view(-1, 1) if x.dim() == 1 else x
......
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