Skip to content
Snippets Groups Projects
Commit 9bd90169 authored by Gregor Kobsik's avatar Gregor Kobsik
Browse files

fix bug: error when shape is fully sampled before last layer

parent 824fa3b1
Branches
No related tags found
No related merge requests found
......@@ -77,4 +77,7 @@ class EncoderOnlySampler:
dep += [next_dep]
pos += [next_pos]
if torch.sum(next_val == 2) == 0:
break # early-out, no mixed tokens sampled
return postprocess(val, target_resolution, self.spatial_dim)
......@@ -89,5 +89,8 @@ class RecurrentSampler:
dep += [next_dep]
pos += [next_pos]
if torch.sum(next_val == 2) == 0:
break # early-out, no mixed tokens sampled
# transform the sampled octree sequence back into a regular-grid voxel array and return
return postprocess(val, target_resolution, self.spatial_dim)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment