summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorJordan Gong <jordan.gong@protonmail.com>2021-02-08 18:34:31 +0800
committerJordan Gong <jordan.gong@protonmail.com>2021-02-08 18:34:31 +0800
commit31e0294cdb2ffd5241c7e85a6e1e98a4ee20ae28 (patch)
tree709ddcf8ba175d09e9be4a91aab4c0eb61679c74 /utils
parentafe615408c4003a513811d900fe3edd119a735a5 (diff)
parentd380e04df37593e414bd5641db100613fb2ad882 (diff)
Merge branch 'python3.8' into python3.7
# Conflicts: # utils/configuration.py
Diffstat (limited to 'utils')
-rw-r--r--utils/triplet_loss.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/triplet_loss.py b/utils/triplet_loss.py
index 8c143d6..d573ef4 100644
--- a/utils/triplet_loss.py
+++ b/utils/triplet_loss.py
@@ -34,5 +34,5 @@ class BatchAllTripletLoss(nn.Module):
parted_loss_mean = all_loss.sum(1) / non_zero_counts
parted_loss_mean[non_zero_counts == 0] = 0
- loss = parted_loss_mean.sum()
+ loss = parted_loss_mean.mean()
return loss