From 55668827d26d5e82c712c0d580b38b52984e8fc2 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Wed, 3 Aug 2022 12:44:11 -0500 Subject: [PATCH] fix resize call --- modules/deeplearning/espcn.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/deeplearning/espcn.py b/modules/deeplearning/espcn.py index 821cf096..91297c91 100644 --- a/modules/deeplearning/espcn.py +++ b/modules/deeplearning/espcn.py @@ -240,9 +240,11 @@ class ESPCN: nda = np.load(f) label_s.append(nda) - #data = np.concatenate(data_s) + # data = np.concatenate(data_s) data = np.concatenate(label_s) - data = tf.image.resize(data, (32, 32)) + hr_shape = data.shape + data = tf.image.resize(data, (hr_shape[0], hr_shape[1], hr_shape[2] // 2, hr_shape[3] // 2)) + label = np.concatenate(label_s) label = label[:, label_idx, :, :] -- GitLab