diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-08 18:34:31 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-08 18:34:31 +0800 |
commit | 31e0294cdb2ffd5241c7e85a6e1e98a4ee20ae28 (patch) | |
tree | 709ddcf8ba175d09e9be4a91aab4c0eb61679c74 /utils/triplet_loss.py | |
parent | afe615408c4003a513811d900fe3edd119a735a5 (diff) | |
parent | d380e04df37593e414bd5641db100613fb2ad882 (diff) |
Merge branch 'python3.8' into python3.7
# Conflicts:
# utils/configuration.py
Diffstat (limited to 'utils/triplet_loss.py')
-rw-r--r-- | utils/triplet_loss.py | 2 |
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 |