mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2026-02-25 23:56:00 +08:00
fbcode/vision/fair/pytorch3d/pytorch3d/loss/mesh_laplacian_smoothing.py
Reviewed By: bottler Differential Revision: D93709347 fbshipit-source-id: 69710e6082a0785126a121e26f1d96a571360f1d
This commit is contained in:
committed by
meta-codesync[bot]
parent
e70188ebbc
commit
eabb511410
@@ -114,9 +114,7 @@ def mesh_laplacian_smoothing(meshes, method: str = "uniform"):
|
||||
if method == "cot":
|
||||
norm_w = torch.sparse.sum(L, dim=1).to_dense().view(-1, 1)
|
||||
idx = norm_w > 0
|
||||
# pyre-fixme[58]: `/` is not supported for operand types `float` and
|
||||
# `Tensor`.
|
||||
norm_w[idx] = 1.0 / norm_w[idx]
|
||||
norm_w[idx] = torch.reciprocal(norm_w[idx])
|
||||
else:
|
||||
L_sum = torch.sparse.sum(L, dim=1).to_dense().view(-1, 1)
|
||||
norm_w = 0.25 * inv_areas
|
||||
|
||||
Reference in New Issue
Block a user