diff --git a/modules/deeplearning/srcnn_l1b_l2.py b/modules/deeplearning/srcnn_l1b_l2.py
index 9d3032e23455f787086c0388097b0c3675383b60..d77a255954e47b02d1e22d78dbf5c620fe5fe13d 100644
--- a/modules/deeplearning/srcnn_l1b_l2.py
+++ b/modules/deeplearning/srcnn_l1b_l2.py
@@ -684,7 +684,6 @@ class SRCNN:
 
         ckpt = tf.train.Checkpoint(step=tf.Variable(1), model=self.model)
         ckpt_manager = tf.train.CheckpointManager(ckpt, ckpt_dir, max_to_keep=3)
-
         ckpt.restore(ckpt_manager.latest_checkpoint)
 
         self.reset_test_metrics()
@@ -778,8 +777,8 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
     hr_grd_c = grd_c.copy()
     hr_grd_c = hr_grd_c[y_128, x_128]
 
-    grd_c = grd_c.copy()
     grd_c = np.where(np.isnan(grd_c), 0, grd_c)
+    grd_c = grd_c.copy()
     grd_c = grd_c[slc_y_2, slc_x_2]
     grd_c = resample_2d_linear_one(x_2, y_2, grd_c, t, s)
     grd_c = grd_c[y_k, x_k]