mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2026-02-26 08:06:00 +08:00
fbcode/vision/fair/pytorch3d/pytorch3d/transforms/transform3d.py
Reviewed By: bottler Differential Revision: D93713606 fbshipit-source-id: a8aa52328a76d95d3985daec529cdce04ba12bd4
This commit is contained in:
committed by
meta-codesync[bot]
parent
1bd911d534
commit
e70188ebbc
@@ -623,9 +623,7 @@ class Scale(Transform3d):
|
|||||||
Return the inverse of self._matrix.
|
Return the inverse of self._matrix.
|
||||||
"""
|
"""
|
||||||
xyz = torch.stack([self._matrix[:, i, i] for i in range(4)], dim=1)
|
xyz = torch.stack([self._matrix[:, i, i] for i in range(4)], dim=1)
|
||||||
# pyre-fixme[58]: `/` is not supported for operand types `float` and `Tensor`.
|
ixyz = torch.reciprocal(xyz)
|
||||||
ixyz = 1.0 / xyz
|
|
||||||
# pyre-fixme[6]: For 1st param expected `Tensor` but got `float`.
|
|
||||||
imat = torch.diag_embed(ixyz, dim1=1, dim2=2)
|
imat = torch.diag_embed(ixyz, dim1=1, dim2=2)
|
||||||
return imat
|
return imat
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user