diff --git a/modules/deeplearning/srcnn_l1b_l2.py b/modules/deeplearning/srcnn_l1b_l2.py index 377e860818b5c2dba7c68dd19824e863e2b26159..bfd88fd67301f56ddcf4b89ddad12fca4a230a4c 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()