Skip to content

Commit eabb511

Browse files
generatedunixname1417043136753450meta-codesync[bot]
authored andcommitted
fbcode/vision/fair/pytorch3d/pytorch3d/loss/mesh_laplacian_smoothing.py
Reviewed By: bottler Differential Revision: D93709347 fbshipit-source-id: 69710e6082a0785126a121e26f1d96a571360f1d
1 parent e70188e commit eabb511

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

pytorch3d/loss/mesh_laplacian_smoothing.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,7 @@ def mesh_laplacian_smoothing(meshes, method: str = "uniform"):
114114
if method == "cot":
115115
norm_w = torch.sparse.sum(L, dim=1).to_dense().view(-1, 1)
116116
idx = norm_w > 0
117-
# pyre-fixme[58]: `/` is not supported for operand types `float` and
118-
# `Tensor`.
119-
norm_w[idx] = 1.0 / norm_w[idx]
117+
norm_w[idx] = torch.reciprocal(norm_w[idx])
120118
else:
121119
L_sum = torch.sparse.sum(L, dim=1).to_dense().view(-1, 1)
122120
norm_w = 0.25 * inv_areas

0 commit comments

Comments
 (0)