From 1ebee4d718337970a843fd366dee70a189829809 Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Wed, 10 Aug 2022 12:48:59 -0500
Subject: [PATCH] snapshot...

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

diff --git a/modules/deeplearning/espcn.py b/modules/deeplearning/espcn.py
index e049d9c8..b7ee4385 100644
--- a/modules/deeplearning/espcn.py
+++ b/modules/deeplearning/espcn.py
@@ -370,7 +370,7 @@ class ESPCN:
         activation = tf.nn.leaky_relu
         momentum = 0.99
 
-        num_filters = 64
+        num_filters = 32
 
         input_2d = self.inputs[0]
         print('input: ', input_2d.shape)
@@ -383,7 +383,7 @@ class ESPCN:
         conv = conv_b = tf.keras.layers.Conv2D(num_filters, kernel_size=3, padding=padding)(input_2d)
 
         if NOISE_TRAINING:
-            conv = tf.keras.layers.GaussianNoise(stddev=NOISE_STDDEV)(conv)
+            conv = conv_b = tf.keras.layers.GaussianNoise(stddev=NOISE_STDDEV)(conv)
 
         conv_b = build_conv2d_block(conv_b, num_filters, 'Residual_Block_1')
 
@@ -391,13 +391,15 @@ class ESPCN:
 
         conv_b = build_conv2d_block(conv_b, num_filters, 'Residual_Block_3')
 
-        conv_b = tf.keras.layers.Conv2D(num_filters // 2, kernel_size=3, strides=1, padding=padding)(conv_b)
+        conv_b = build_conv2d_block(conv_b, num_filters, 'Residual_Block_4')
+
+        conv_b = tf.keras.layers.Conv2D(num_filters, 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((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)
-- 
GitLab