From 0d6427c2bf5029a11c57cf75cfcc10a08d5eaa74 Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Fri, 12 Aug 2022 12:59:30 -0500
Subject: [PATCH] test...

---
 modules/deeplearning/espcn.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/deeplearning/espcn.py b/modules/deeplearning/espcn.py
index dc11ac89..c506a4f5 100644
--- a/modules/deeplearning/espcn.py
+++ b/modules/deeplearning/espcn.py
@@ -173,6 +173,7 @@ class ESPCN:
         self.X_img = tf.keras.Input(shape=(None, None, self.n_chans))
         # self.X_img = tf.keras.Input(shape=(36, 36, self.n_chans))
         self.X_img = tf.keras.Input(shape=(32, 32, self.n_chans))
+        # self.X_img = tf.keras.Input(shape=(66, 66, self.n_chans))
 
         self.inputs.append(self.X_img)
 
@@ -196,12 +197,12 @@ class ESPCN:
         # label = label[:, label_idx, :, :]
         label = label[:, label_idx, 3:67, 3:67]
         label = np.expand_dims(label, axis=3)
-        #label = tf.image.resize(label, (32, 32), method='nearest').numpy()
+        label = tf.image.resize(label, (32, 32), method='nearest').numpy()
 
         # data = data[:, data_idx, :, :]
         data = data[:, data_idx, 3:67, 3:67]
         data = np.expand_dims(data, axis=3)
-        #data = tf.image.resize(data, (32, 32), method='nearest').numpy()
+        data = tf.image.resize(data, (32, 32), method='nearest').numpy()
         # data = tf.image.resize(data, (36, 36)).numpy()
 
         data = data.astype(np.float32)
@@ -346,6 +347,8 @@ class ESPCN:
         print('input: ', conv.shape)
 
         conv = conv_b = tf.keras.layers.Conv2D(num_filters, kernel_size=3, padding=padding)(input_2d)
+        # conv = conv_b = tf.keras.layers.Conv2D(num_filters, kernel_size=3, padding='VALID')(input_2d)
+        print(conv.shape)
 
         if NOISE_TRAINING:
             conv = conv_b = tf.keras.layers.GaussianNoise(stddev=NOISE_STDDEV)(conv)
-- 
GitLab