diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-08 18:31:52 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-08 18:31:52 +0800 |
commit | d380e04df37593e414bd5641db100613fb2ad882 (patch) | |
tree | 1e3b3ea55a464d59d790711372bbca42cb203d0a /utils/triplet_loss.py | |
parent | a040400d7caa267d4bfbe8e5520568806f92b3d4 (diff) | |
parent | 99ddd7c142a4ec97cb8bd14b204651790b3cf4ee (diff) |
Merge branch 'master' into python3.8
# Conflicts:
# models/hpm.py
# models/layers.py
# models/model.py
# models/rgb_part_net.py
# 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 |