Fix: Pointclouds.inside_box reducing over spatial dimensions.

Summary: As subj. Tests corrected accordingly. Also changed the test to provide a bit better diagnostics.

Reviewed By: bottler

Differential Revision: D32879498

fbshipit-source-id: 0a852e4a13dcb4ca3e54d71c6b263c5d2eeaf4eb
This commit is contained in:
Roman Shapovalov
2021-12-06 07:44:14 -08:00
committed by Facebook GitHub Bot
parent d9f709599b
commit a6508ac3df
3 changed files with 19 additions and 8 deletions

View File

@@ -1176,5 +1176,5 @@ class Pointclouds:
]
box = torch.cat(box, 0)
idx = (points_packed >= box[:, 0]) * (points_packed <= box[:, 1])
return idx
coord_inside = (points_packed >= box[:, 0]) * (points_packed <= box[:, 1])
return coord_inside.all(dim=-1)