From f33d4d609a7701ac475cf6fa5e7ed982f61dd698 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Mon, 26 Dec 2022 13:26:18 -0600 Subject: [PATCH] snapshot... --- modules/deeplearning/srcnn_l1b_l2.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/deeplearning/srcnn_l1b_l2.py b/modules/deeplearning/srcnn_l1b_l2.py index f69728a5..09c8f640 100644 --- a/modules/deeplearning/srcnn_l1b_l2.py +++ b/modules/deeplearning/srcnn_l1b_l2.py @@ -693,6 +693,7 @@ class SRCNN: pred = self.model([data], training=False) self.test_probs = pred pred = pred.numpy() + print('**: ', pred.shape, pred.min(), pred.max()) return pred @@ -774,19 +775,29 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): # grd_c = gaussian_filter(grd_c, sigma=1.0) grd_c = grd_c[y_0:y_0+sub_y, x_0:x_0+sub_x] grd_c = grd_c.copy() + print(grd_c.shape) grd_c = np.where(np.isnan(grd_c), 0, grd_c) hr_grd_c = grd_c.copy() hr_grd_c = hr_grd_c[y_128, x_128] + print(hr_grd_c.shape) grd_c = grd_c[slc_y_2, slc_x_2] + print(grd_c.shape) grd_c = resample_2d_linear_one(x_2, y_2, grd_c, t, s) + print(grd_c.shape) grd_c = grd_c[y_k, x_k] + print(grd_c.shape) if label_param != 'cloud_probability': grd_c = normalize(grd_c, label_param, mean_std_dct) + print(grd_c.shape) # data = np.stack([grd_a, grd_b, grd_c], axis=2) #data = np.stack([grd_a, grd_c], axis=2) data = np.stack([grd_c], axis=2) + print(data.shape) data = np.expand_dims(data, axis=0) + print(data.shape) + dn = denormalize(grd_c, label_param, mean_std_dct) + return hr_grd_c, grd_c, dn nn = SRCNN() out_sr = nn.run_evaluate(data, ckpt_dir) -- GitLab