From 7d5ab81dbf63d7b4ed1d12d9eb85632eb44c3e22 Mon Sep 17 00:00:00 2001 From: blackfly Date: Wed, 8 Apr 2020 22:44:02 +0200 Subject: [PATCH] Clean up prototorch/functions/distances.py --- prototorch/functions/distances.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/prototorch/functions/distances.py b/prototorch/functions/distances.py index d8d6d20..02833f6 100644 --- a/prototorch/functions/distances.py +++ b/prototorch/functions/distances.py @@ -33,13 +33,6 @@ def lpnorm_distance(x, y, p): Expected dimension of x is 2. Expected dimension of y is 2. """ - # # DEPRECATED in favor of torch.cdist - # expanded_x = x.unsqueeze(dim=1) - # batchwise_difference = y - expanded_x - # differences_raised = torch.pow(batchwise_difference, p) - # distances_raised = torch.sum(differences_raised, axis=2) - # distances = torch.pow(distances_raised, 1.0 / p) - # return distances distances = torch.cdist(x, y, p=p) return distances