From 6edf43553a2a1ea2a63ca77658c2cdf52db24116 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Thu, 6 Oct 2022 15:28:01 -0500 Subject: [PATCH] snapshot... --- modules/deeplearning/srcnn_l1b_l2.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/deeplearning/srcnn_l1b_l2.py b/modules/deeplearning/srcnn_l1b_l2.py index 377e8608..bfd88fd6 100644 --- a/modules/deeplearning/srcnn_l1b_l2.py +++ b/modules/deeplearning/srcnn_l1b_l2.py @@ -237,6 +237,7 @@ class SRCNN: data_norm.append(tmp) # -------- tmp = input_data[:, label_idx, 3:131:2, 3:131:2] + tmp = np.where(np.isnan(tmp), 0, tmp) tmp = resample_2d_linear(x_64, y_64, tmp, t, s) data_norm.append(tmp) # --------- @@ -245,6 +246,7 @@ class SRCNN: # label = input_data[:, label_idx, 3:131:2, 3:131:2] label = input_data[:, label_idx, 3:131, 3:131] + label = np.where(np.isnan(label), 0, label) label = np.expand_dims(label, axis=3) if label_param != 'cloud_fraction': label = normalize(label, label_param, mean_std_dct) @@ -650,7 +652,7 @@ class SRCNN: self.do_training() def run_restore(self, directory, ckpt_dir): - valid_data_files = glob.glob(directory + 'data_valid*.npy') + valid_data_files = glob.glob(directory + 'data_*.npy') self.num_data_samples = 1000 self.setup_test_pipeline(valid_data_files) self.build_model() -- GitLab