suppress errors in fbcode/vision - batch 2

Differential Revision: D33338085

fbshipit-source-id: fdb207864718c56dfa0d20530b59349c93af11bd
This commit is contained in:
Pyre Bot Jr 2021-12-28 11:27:27 -08:00 committed by Facebook GitHub Bot
parent 52c71b8816
commit 7660ed1876
2 changed files with 7 additions and 1 deletions

View File

@ -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(

View File

@ -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