Skip to content

Commit 4b57e4d

Browse files
Chris AndersonChris Anderson
andauthored
Fix non-existent variable, remove unused import. (#106)
* Fix non-existent variable, remove unused import. * Adjust fix to be simpler. Co-authored-by: Chris Anderson <cranderson@verisk.com>
1 parent 7776d45 commit 4b57e4d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pointnet2_ops_lib/pointnet2_ops/pointnet2_utils.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import sys
2-
import warnings
3-
from typing import *
4-
51
import torch
62
import torch.nn as nn
3+
import warnings
74
from torch.autograd import Function
5+
from typing import *
86

97
try:
108
import pointnet2_ops._ext as _ext
@@ -124,7 +122,7 @@ def forward(ctx, unknown, known):
124122
(B, n, 3) index of 3 nearest neighbors
125123
"""
126124
dist2, idx = _ext.three_nn(unknown, known)
127-
dist = torch.sqrt(dist)
125+
dist = torch.sqrt(dist2)
128126

129127
ctx.mark_non_differentiable(dist, idx)
130128

0 commit comments

Comments
 (0)