MCPcopy
hub / github.com/erikwijmans/Pointnet2_PyTorch / pdist2_slow

Function pdist2_slow

pointnet2/utils/linalg_utils.py:61–69  ·  view source on GitHub ↗
(X, Z=None)

Source from the content-addressed store, hash-verified

59
60
61def pdist2_slow(X, Z=None):
62 if Z is None: Z = X
63 D = torch.zeros(X.size(0), X.size(2), Z.size(2))
64
65 for b in range(D.size(0)):
66 for i in range(D.size(1)):
67 for j in range(D.size(2)):
68 D[b, i, j] = torch.dist(X[b, :, i], Z[b, :, j])
69 return D
70
71
72if __name__ == "__main__":

Callers 1

linalg_utils.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected