From e436d4136e8fc4235eda62e58c04912c812e83f1 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Tue, 29 Aug 2023 10:56:12 -0500 Subject: [PATCH] snapshot... --- modules/deeplearning/srcnn_l1b_l2.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/modules/deeplearning/srcnn_l1b_l2.py b/modules/deeplearning/srcnn_l1b_l2.py index eddc2f0a..bc6d543d 100644 --- a/modules/deeplearning/srcnn_l1b_l2.py +++ b/modules/deeplearning/srcnn_l1b_l2.py @@ -775,20 +775,8 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): return out_sr, hr_grd_a, hr_grd_b, hr_grd_c -def analyze(file='/Users/tomrink/cld_opd_out.npy'): - # Save this: - # nn.test_data_files = glob.glob('/Users/tomrink/data/clavrx_opd_valid_DAY/data_valid*.npy') - # idxs = np.arange(50) - # dat, lbl = nn.get_in_mem_data_batch(idxs, False) - # tmp = dat[:, 1:128, 1:128, 1] - # tmp = dat[:, 1:129, 1:129, 1] - - tup = np.load(file, allow_pickle=True) - lbls = tup[0] - pred = tup[1] - - lbls = lbls[:, :, :, 0] - pred = pred[:, :, :, 0] +def analyze(lbls, pred): + print('Total num pixels: ', lbls.size) pred = pred.flatten() -- GitLab