From c7e5d3888a4957c6ecc292bc55a4aba63288f938 Mon Sep 17 00:00:00 2001 From: James Betker Date: Mon, 3 Aug 2020 16:21:05 -0600 Subject: [PATCH] Add pix_grad_branch loss to metrics --- codes/models/SRGAN_model.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codes/models/SRGAN_model.py b/codes/models/SRGAN_model.py index 93798d43..17e0b59b 100644 --- a/codes/models/SRGAN_model.py +++ b/codes/models/SRGAN_model.py @@ -726,6 +726,8 @@ class SRGANModel(BaseModel): self.add_log_entry('l_d_fake_total', l_d_fake.item() * self.mega_batch_factor) self.add_log_entry('l_d_real_total', l_d_real.item() * self.mega_batch_factor) if self.spsr_enabled: + if self.cri_pix_grad: + self.add_log_entry('l_g_pix_grad_branch', l_g_pix_grad.item()) if self.cri_pix_branch: self.add_log_entry('l_g_pix_grad_branch', l_g_pix_grad_branch.item()) if self.l_gan_w > 0 and step >= self.G_warmup: