The current euclidean distance calculation produces non-symmetric distance matrices. I suspect this is a numeric issue (although it persists even when using float64):
out = -2 * torch.matmul(x, y)
out += (x ** 2).sum(dim=-1, keepdim=True)
out += (y ** 2).sum(dim=-2, keepdim=True)
a = out.t() - out
The current euclidean distance calculation produces non-symmetric distance matrices. I suspect this is a numeric issue (although it persists even when using float64):
Apparently
sklearn.metric.pairwise_distance
also has this issue...