Skip to content

Commit c802771

Browse files
committed
Fixed sparse feature hierarchy tests to be voxel-centered
Signed-off-by: Christopher Horvath <chorvath@nvidia.com>
1 parent cbf1f9d commit c802771

File tree

5 files changed

+1169
-65
lines changed

5 files changed

+1169
-65
lines changed

surface_reconstruction/nksr/nksr_fvdb/sparse_feature_hierarchy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,9 @@ def bounds_voxel(self) -> JaggedTensor:
154154
will interpret that as a batch size of 1. Instead, we create an offsets tensor
155155
that's just arange.
156156
"""
157-
offsets = torch.arange(0, self.grid.grid_count, dtype=torch.int32, device=self.grid.device)
158-
return JaggedTensor.from_data_and_offsets(self.grid.bboxes, offsets)
157+
bboxes = self.grid.bboxes
158+
offsets = torch.arange(0, self.grid.grid_count + 1, dtype=torch.long, device=self.grid.device)
159+
return JaggedTensor.from_data_and_offsets(bboxes, offsets)
159160

160161
@property
161162
def bounds_world(self) -> JaggedTensor:

0 commit comments

Comments
 (0)