From ac3f8dc83348487dcb7af6f274b2d0bfaaf0cc0d Mon Sep 17 00:00:00 2001 From: generatedunixname89002005307016 Date: Mon, 4 Jan 2021 23:08:44 -0800 Subject: [PATCH] suppress errors in `vision/fair/pytorch3d` Differential Revision: D25777275 fbshipit-source-id: ca30fedca118ff22a8be5e29c4c4f21628c94579 --- pytorch3d/structures/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pytorch3d/structures/utils.py b/pytorch3d/structures/utils.py index bfe376e9..d88f1450 100644 --- a/pytorch3d/structures/utils.py +++ b/pytorch3d/structures/utils.py @@ -48,9 +48,10 @@ def list_to_padded( # replace empty 1D tensors with empty tensors with a correct number of dimensions x = [ + # pyre-fixme[16]: `Tensor` has no attribute `new_zeros`. (y.new_zeros([0] * element_ndim) if (y.ndim == 1 and y.nelement() == 0) else y) for y in x - ] # pyre-ignore + ] if any(y.ndim != x[0].ndim for y in x): raise ValueError("All items have to have the same number of dimensions!") @@ -65,6 +66,7 @@ def list_to_padded( pad_dims = pad_size N = len(x) + # pyre-fixme[16]: `Tensor` has no attribute `new_full`. x_padded = x[0].new_full((N, *pad_dims), pad_value) for i, y in enumerate(x): if len(y) > 0: