From 39e380bca8cbbebc3522d378e26cdcde1455c60d Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 25 Nov 2021 08:28:20 +0100 Subject: [PATCH] bug fixing loss function --- models/Model_AMP/Model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/Model_AMP/Model.py b/models/Model_AMP/Model.py index 62f64db..f4ede17 100644 --- a/models/Model_AMP/Model.py +++ b/models/Model_AMP/Model.py @@ -524,7 +524,7 @@ class AMPModel(ModelBase): if self.options['loss_function'] == 'MS-SSIM': gpu_dst_loss = 10 * nn.MsSsim(bs_per_gpu, input_ch, resolution)(gpu_target_dst_masked, gpu_pred_dst_dst_masked, max_val=1.0) - gpu_src_loss += tf.reduce_mean ( 10*tf.square ( gpu_target_dst_masked - gpu_pred_dst_dst_masked ), axis=[1,2,3]) + gpu_dst_loss += tf.reduce_mean ( 10*tf.square ( gpu_target_dst_masked - gpu_pred_dst_dst_masked ), axis=[1,2,3]) elif self.options['loss_function'] == 'MS-SSIM+L1': gpu_dst_loss = 10 * nn.MsSsim(bs_per_gpu, input_ch, resolution, use_l1=True)(gpu_target_dst_masked, gpu_pred_dst_dst_masked, max_val=1.0)