From a1bff64d1a0c836f40a5ffdd81add4982f1e37d8 Mon Sep 17 00:00:00 2001 From: James Betker Date: Thu, 16 Jul 2020 10:48:48 -0600 Subject: [PATCH] More fixes --- 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 6402efcd..a031e12d 100644 --- a/codes/models/SRGAN_model.py +++ b/codes/models/SRGAN_model.py @@ -485,7 +485,7 @@ class SRGANModel(BaseModel): self.add_log_entry('l_d_fake', l_d_fake_log.item()) self.add_log_entry('D_fake', torch.mean(pred_d_fake.detach())) self.add_log_entry('D_diff', torch.mean(pred_d_fake) - torch.mean(pred_d_real)) - if isinstance(l_d_fea_real, torch.tensor): + if self.opt['train']['gan_type'] == 'pixgan_fea': self.add_log_entry('l_d_fea_fake', l_d_fea_fake.item() * self.mega_batch_factor) self.add_log_entry('l_d_fea_real', l_d_fea_real.item() * self.mega_batch_factor) self.add_log_entry('l_d_fake_total', l_d_fake.item() * self.mega_batch_factor)