mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2026-03-03 18:55:59 +08:00
formatting changes from black 22.3.0
Summary: Applies the black-fbsource codemod with the new build of pyfmt. paintitblack Reviewed By: lisroach Differential Revision: D36324783 fbshipit-source-id: 280c09e88257e5e569ab729691165d8dedd767bc
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c21ba144e7
commit
bef959c755
@@ -80,7 +80,7 @@ class _SymEig3x3(nn.Module):
|
||||
q = inputs_trace / 3.0
|
||||
|
||||
# Calculate squared sum of elements outside the main diagonal / 2
|
||||
p1 = ((inputs ** 2).sum(dim=(-1, -2)) - (inputs_diag ** 2).sum(-1)) / 2
|
||||
p1 = ((inputs**2).sum(dim=(-1, -2)) - (inputs_diag**2).sum(-1)) / 2
|
||||
p2 = ((inputs_diag - q[..., None]) ** 2).sum(dim=-1) + 2.0 * p1.clamp(self._eps)
|
||||
|
||||
p = torch.sqrt(p2 / 6.0)
|
||||
@@ -195,7 +195,7 @@ class _SymEig3x3(nn.Module):
|
||||
cross_products[..., :1, :]
|
||||
)
|
||||
|
||||
norms_sq = (cross_products ** 2).sum(dim=-1)
|
||||
norms_sq = (cross_products**2).sum(dim=-1)
|
||||
max_norms_index = norms_sq.argmax(dim=-1) # pyre-ignore[16]
|
||||
|
||||
# Pick only the cross-product with highest squared norm for each input
|
||||
|
||||
Reference in New Issue
Block a user