mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-22 07:10:34 +08:00
Add pyre typeshed information for Tensor.ndim and nn.ConvTranspose2d
Summary: Adding some appropriate methods into pyre typeshed. Removing corresponding pyre-ignore and pyre-fixme messages. Differential Revision: D22949138 fbshipit-source-id: add8acdd4611ab698954868832594d062cd58f88
This commit is contained in:
committed by
Facebook GitHub Bot
parent
701bbef4f3
commit
14f015d8bf
@@ -48,7 +48,6 @@ def list_to_padded(
|
||||
)
|
||||
for i, y in enumerate(x):
|
||||
if len(y) > 0:
|
||||
# pyre-fixme[16]: `Tensor` has no attribute `ndim`.
|
||||
if y.ndim != 2:
|
||||
raise ValueError("Supports only 2-dimensional tensor items")
|
||||
x_padded[i, : y.shape[0], : y.shape[1]] = y
|
||||
@@ -70,7 +69,6 @@ def padded_to_list(x: torch.Tensor, split_size: Union[list, tuple, None] = None)
|
||||
Returns:
|
||||
x_list: a list of tensors
|
||||
"""
|
||||
# pyre-fixme[16]: `Tensor` has no attribute `ndim`.
|
||||
if x.ndim != 3:
|
||||
raise ValueError("Supports only 3-dimensional input tensors")
|
||||
|
||||
@@ -178,7 +176,6 @@ def padded_to_packed(
|
||||
Returns:
|
||||
x_packed: a packed tensor.
|
||||
"""
|
||||
# pyre-fixme[16]: `Tensor` has no attribute `ndim`.
|
||||
if x.ndim != 3:
|
||||
raise ValueError("Supports only 3-dimensional input tensors")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user