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:
Adly Templeton
2020-09-02 06:51:15 -07:00
committed by Facebook GitHub Bot
parent 701bbef4f3
commit 14f015d8bf
4 changed files with 1 additions and 10 deletions

View File

@@ -155,7 +155,6 @@ class Transform3d:
if matrix is None:
self._matrix = torch.eye(4, dtype=dtype, device=device).view(1, 4, 4)
else:
# pyre-fixme[16]: `Tensor` has no attribute `ndim`.
if matrix.ndim not in (2, 3):
raise ValueError('"matrix" has to be a 2- or a 3-dimensional tensor.')
if matrix.shape[-2] != 4 or matrix.shape[-1] != 4: