Commit 7660ed18 authored by Pyre Bot Jr's avatar Pyre Bot Jr Committed by Facebook GitHub Bot
Browse files

suppress errors in `fbcode/vision` - batch 2

Differential Revision: D33338085

fbshipit-source-id: fdb207864718c56dfa0d20530b59349c93af11bd
parent 52c71b88
...@@ -137,7 +137,11 @@ def convert_pointclouds_to_tensor(pcl: Union[torch.Tensor, "Pointclouds"]): ...@@ -137,7 +137,11 @@ def convert_pointclouds_to_tensor(pcl: Union[torch.Tensor, "Pointclouds"]):
elif torch.is_tensor(pcl): elif torch.is_tensor(pcl):
X = pcl X = pcl
num_points = X.shape[1] * torch.ones( # type: ignore 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: else:
raise ValueError( raise ValueError(
......
...@@ -214,6 +214,8 @@ def softmax_rgb_blend( ...@@ -214,6 +214,8 @@ def softmax_rgb_blend(
# pyre-fixme[16] # pyre-fixme[16]
zfar = zfar[:, None, None, None] zfar = zfar[:, None, None, None]
if torch.is_tensor(znear): if torch.is_tensor(znear):
# pyre-fixme[16]: Item `float` of `Union[float, Tensor]` has no attribute
# `__getitem__`.
znear = znear[:, None, None, None] znear = znear[:, None, None, None]
z_inv = (zfar - fragments.zbuf) / (zfar - znear) * mask z_inv = (zfar - fragments.zbuf) / (zfar - znear) * mask
......
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