From 6ecd67406654cda1aa5ccaa7b19fb9f4afa6b530 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Wed, 25 Jan 2023 12:55:40 -0600 Subject: [PATCH] snapshot... --- modules/deeplearning/srcnn_cld_frac.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/deeplearning/srcnn_cld_frac.py b/modules/deeplearning/srcnn_cld_frac.py index 22df4414..88313c32 100644 --- a/modules/deeplearning/srcnn_cld_frac.py +++ b/modules/deeplearning/srcnn_cld_frac.py @@ -148,6 +148,12 @@ def build_residual_block_conv2d_down2x(x_in, num_filters, activation, padding='S if do_batch_norm: conv = tf.keras.layers.BatchNormalization()(conv) + conv = tf.keras.layers.Conv2D(num_filters, kernel_size=3, strides=1, padding=padding, activation=activation)(conv) + if do_drop_out: + conv = tf.keras.layers.Dropout(drop_rate)(conv) + if do_batch_norm: + conv = tf.keras.layers.BatchNormalization()(conv) + skip = tf.keras.layers.Conv2D(num_filters, kernel_size=3, strides=1, padding=padding, activation=None)(skip) skip = tf.keras.layers.MaxPool2D(padding=padding)(skip) if do_drop_out: @@ -501,7 +507,7 @@ class SRCNN: conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_3', kernel_size=KERNEL_SIZE, scale=scale) - # conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_4', kernel_size=KERNEL_SIZE, scale=scale) + conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_4', kernel_size=KERNEL_SIZE, scale=scale) # conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_5', kernel_size=KERNEL_SIZE, scale=scale) -- GitLab