summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Gong <jordan.gong@protonmail.com>2021-03-27 21:27:12 +0800
committerJordan Gong <jordan.gong@protonmail.com>2021-03-27 21:27:12 +0800
commit99d1b18ac380bcf7d7579d80e09c9ddaecde44b3 (patch)
treeab8a74b1f3c314441ae75a1abdac85605c9633d8
parent5a063855dbecb8f1a86ad25d9e61a9c8b63312b3 (diff)
Normalize triplet losses
-rw-r--r--models/model.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/model.py b/models/model.py
index ceadb92..cc5887e 100644
--- a/models/model.py
+++ b/models/model.py
@@ -344,8 +344,8 @@ class Model:
)
losses = torch.stack((
*ae_losses,
- hpm_result.pop('loss').mean(),
- pn_result.pop('loss').mean()
+ torch.log(hpm_result.pop('loss').mean() + 1),
+ torch.log(pn_result.pop('loss').mean() + 1)
))
return losses, hpm_result, pn_result