From 8009120f07f78afe249f803da367f518028ec4b0 Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Thu, 3 Nov 2022 14:27:25 -0500
Subject: [PATCH] snapshot...

---
 modules/deeplearning/cnn_cld_frac.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/deeplearning/cnn_cld_frac.py b/modules/deeplearning/cnn_cld_frac.py
index f408659d..fc1b5627 100644
--- a/modules/deeplearning/cnn_cld_frac.py
+++ b/modules/deeplearning/cnn_cld_frac.py
@@ -313,10 +313,12 @@ class CNN:
 
     def get_label_data(self, grd_k):
         num, leny, lenx = grd_k.shape
-        grd_down_2x = np.zeros((num, leny, lenx))
+        leny_d2x = int(leny / 2)
+        lenx_d2x = int(lenx / 2)
+        grd_down_2x = np.zeros((num, leny_d2x, lenx_d2x))
         for t in range(num):
-            for j in range(int(leny / 2)):
-                for i in range(int(lenx / 2)):
+            for j in range(leny_d2x):
+                for i in range(lenx_d2x):
                     cell = grd_k[t, j:j + 2, i:i + 2]
                     if np.sum(np.isnan(cell)) == 0:
                         cnt = np.sum(cell)
@@ -450,14 +452,12 @@ class CNN:
         conv = input_2d
         print('input: ', conv.shape)
 
-        conv = conv_b = tf.keras.layers.Conv2D(num_filters, kernel_size=2, strides=1, kernel_initializer='he_uniform', activation=activation, padding='SAME')(input_2d)
+        conv = conv_b = tf.keras.layers.Conv2D(num_filters, kernel_size=2, strides=2, kernel_initializer='he_uniform', activation=activation, padding='SAME')(input_2d)
         print(conv.shape)
 
         if NOISE_TRAINING:
             conv = conv_b = tf.keras.layers.GaussianNoise(stddev=NOISE_STDDEV)(conv)
 
-        scale = 0.2
-
         conv_b = build_residual_block_1x1(conv_b, num_filters, activation, 'Residual_Block_1')
 
         conv_b = build_residual_block_1x1(conv_b, num_filters, activation, 'Residual_Block_2')
-- 
GitLab