Commit caa33713 authored by Christoph Lassner's avatar Christoph Lassner Committed by Facebook GitHub Bot
Browse files

Fix Pulsar backend batched radius handling.

Summary: This fixes a corner case for multi-radius handling for the pulsar backend. The additional dimensionality check ensures that the batched parsing for radiuses is only performed when appropriate.

Reviewed By: bottler

Differential Revision: D25387708

fbshipit-source-id: c486dcf327f812265b7ca8ca5ef5c6a31e6d4549
parent ebac66da
......@@ -399,7 +399,11 @@ class PulsarPointsRenderer(nn.Module):
raster_rad = self.rasterizer.raster_settings.radius
if kwargs.get("radius_world", False):
return raster_rad
if isinstance(raster_rad, torch.Tensor) and raster_rad.numel() > 1:
if (
isinstance(raster_rad, torch.Tensor)
and raster_rad.numel() > 1
and raster_rad.ndim > 1
):
# In this case it must be a batched torch tensor.
raster_rad = raster_rad[cloud_idx]
if orthogonal_projection:
......
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