diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-14 20:50:10 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-14 20:50:10 +0800 |
commit | 34d2f9017e77a7bdef761ab3d92cd0340c5154c3 (patch) | |
tree | 1cd208e9bfdc92900ee407653c3a21304e2e922d /utils | |
parent | ba705ac60f463b034782ba03796dbfa2776a5631 (diff) | |
parent | be508061aeb3049a547c4e0c92d21c254689c1d5 (diff) |
Merge branch 'master' into python3.8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/triplet_loss.py | 2 |
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) |