mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-21 14:50:36 +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
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user