From 7a81d4e2f40297c602f0956cf4fff69e0db14bc5 Mon Sep 17 00:00:00 2001 From: James Betker Date: Fri, 4 Dec 2020 12:49:20 -0700 Subject: [PATCH] Revert gaussian loss changes --- codes/models/archs/srflow_orig/SRFlowNet_arch.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/codes/models/archs/srflow_orig/SRFlowNet_arch.py b/codes/models/archs/srflow_orig/SRFlowNet_arch.py index 3dd99896..548b8aae 100644 --- a/codes/models/archs/srflow_orig/SRFlowNet_arch.py +++ b/codes/models/archs/srflow_orig/SRFlowNet_arch.py @@ -127,11 +127,7 @@ class SRFlowNet(nn.Module): else: z = epses - logp = 0 - for eps in epses: - logp = logp + flow.GaussianDiag.logp(None, None, eps) - logp_weight = opt_get(self.opt, ['networks', 'generator', 'flow', 'gaussian_loss_weight'], 1) - logp = logp * logp_weight + logp = flow.GaussianDiag.logp(None, None, z) objective = objective + logp nll = (-objective) / float(np.log(2.) * pixels)