We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bab0de commit 3721d15Copy full SHA for 3721d15
torch_points/torchpoints.py
@@ -29,6 +29,8 @@ def furthest_point_sample(xyz, npoint):
29
torch.Tensor
30
(B, npoint) tensor containing the set
31
"""
32
+ if npoint > xyz.shape[1]:
33
+ raise ValueError("caanot sample %i points from an input set of %i points" % (npoint, xyz.shape[1]))
34
if xyz.is_cuda:
35
return tpcuda.furthest_point_sampling(xyz, npoint)
36
else:
@@ -52,6 +54,8 @@ def three_nn(unknown, known):
52
54
idx : torch.Tensor
53
55
(B, n, 3) index of 3 nearest neighbors
56
57
+ if unknown.shape[1] < 3:
58
+ raise ValueError("Not enough points. unknown should ahve at least 3 points.")
59
if unknown.is_cuda:
60
dist2, idx = tpcuda.three_nn(unknown, known)
61
0 commit comments