mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-21 21:32:49 +08:00
suppress errors in fbcode/vision
- batch 2
Differential Revision: D33338085 fbshipit-source-id: fdb207864718c56dfa0d20530b59349c93af11bd
This commit is contained in:
parent
52c71b8816
commit
7660ed1876
@ -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(
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user