From 99d1b18ac380bcf7d7579d80e09c9ddaecde44b3 Mon Sep 17 00:00:00 2001 From: Jordan Gong Date: Sat, 27 Mar 2021 21:27:12 +0800 Subject: Normalize triplet losses --- models/model.py | 4 ++-- 1 file 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 -- cgit v1.2.3