From 2f706b7d9370692eef400db6c69193ee2688daa3 Mon Sep 17 00:00:00 2001 From: James Betker Date: Tue, 25 Aug 2020 16:42:59 -0600 Subject: [PATCH] I an inept. --- codes/models/SRGAN_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/models/SRGAN_model.py b/codes/models/SRGAN_model.py index f6ab2737..7016c257 100644 --- a/codes/models/SRGAN_model.py +++ b/codes/models/SRGAN_model.py @@ -840,7 +840,7 @@ class SRGANModel(BaseModel): self.add_log_entry('l_d_fake', l_d_fake_log.detach().item()) self.add_log_entry('D_fake', torch.mean(pred_d_fake.detach())) self.add_log_entry('D_diff', torch.mean(pred_d_fake.detach()) - torch.mean(pred_d_real.detach())) - if self.spsr_enabled and self.cri_grad_gan > 0: + if self.spsr_enabled and self.cri_grad_gan: self.add_log_entry('l_d_real_grad', l_d_real_grad.detach().item()) self.add_log_entry('l_d_fake_grad', l_d_fake_grad.detach().item()) self.add_log_entry('D_fake_grad', torch.mean(pred_d_fake_grad.detach()))