summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/triplet_loss.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/utils/triplet_loss.py b/utils/triplet_loss.py
index d573ef4..954def2 100644
--- a/utils/triplet_loss.py
+++ b/utils/triplet_loss.py
@@ -9,9 +9,7 @@ class BatchAllTripletLoss(nn.Module):
self.margin = margin
def forward(self, x, y):
- # Duplicate labels for each part
p, n, c = x.size()
- y = y.repeat(p, 1)
# Euclidean distance p x n x n
x_squared_sum = torch.sum(x ** 2, dim=2)