diff --git a/pytorch3d/ops/utils.py b/pytorch3d/ops/utils.py index 3b33b708..4d937ae1 100644 --- a/pytorch3d/ops/utils.py +++ b/pytorch3d/ops/utils.py @@ -137,7 +137,11 @@ def convert_pointclouds_to_tensor(pcl: Union[torch.Tensor, "Pointclouds"]): elif torch.is_tensor(pcl): X = pcl num_points = X.shape[1] * torch.ones( # type: ignore - X.shape[0], device=X.device, dtype=torch.int64 + # pyre-fixme[16]: Item `Pointclouds` of `Union[Pointclouds, Tensor]` has + # no attribute `shape`. + X.shape[0], + device=X.device, + dtype=torch.int64, ) else: raise ValueError( diff --git a/pytorch3d/renderer/blending.py b/pytorch3d/renderer/blending.py index 86d59db9..f2afe8aa 100644 --- a/pytorch3d/renderer/blending.py +++ b/pytorch3d/renderer/blending.py @@ -214,6 +214,8 @@ def softmax_rgb_blend( # pyre-fixme[16] zfar = zfar[:, None, None, None] if torch.is_tensor(znear): + # pyre-fixme[16]: Item `float` of `Union[float, Tensor]` has no attribute + # `__getitem__`. znear = znear[:, None, None, None] z_inv = (zfar - fragments.zbuf) / (zfar - znear) * mask