From d26e0dca94b6bfebd778e8f0468e7514acb4a73f Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Tue, 9 Aug 2022 13:01:06 -0500
Subject: [PATCH] snapshot...

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

diff --git a/modules/deeplearning/espcn.py b/modules/deeplearning/espcn.py
index d3e326b7..e049d9c8 100644
--- a/modules/deeplearning/espcn.py
+++ b/modules/deeplearning/espcn.py
@@ -204,7 +204,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=(32, 32, self.n_chans))
 
         self.inputs.append(self.X_img)
 
@@ -391,13 +391,17 @@ class ESPCN:
 
         conv_b = build_conv2d_block(conv_b, num_filters, 'Residual_Block_3')
 
-        conv_b = tf.keras.layers.Conv2D(num_filters, kernel_size=3, strides=1, padding=padding)(conv_b)
+        conv_b = tf.keras.layers.Conv2D(num_filters // 2, kernel_size=3, strides=1, padding=padding)(conv_b)
 
         conv = conv + conv_b
+        print(conv.shape)
 
-        conv = tf.keras.layers.Conv2D(num_filters * (factor ** 2), 3, padding='same')(conv)
+        # conv = tf.keras.layers.Conv2D(num_filters * (factor ** 2), 3, padding='same')(conv)
+        conv = tf.keras.layers.Conv2D((factor ** 2), 3, padding='same')(conv)
+        print(conv.shape)
 
         conv = tf.nn.depth_to_space(conv, factor)
+        print(conv.shape)
 
         self.logits = tf.keras.layers.Conv2D(1, kernel_size=3, strides=1, padding=padding, name='regression')(conv)
 
-- 
GitLab