diff --git a/modules/deeplearning/espcn_l1b_l2.py b/modules/deeplearning/espcn_l1b_l2.py index 8a85149516edb452fe01f2d971f063a06280fa37..3c98cebad81dcd2cdab15a19f1848357c3173ca6 100644 --- a/modules/deeplearning/espcn_l1b_l2.py +++ b/modules/deeplearning/espcn_l1b_l2.py @@ -72,8 +72,6 @@ y_134_2 = y_134[2:133:2] slc_x = slice(3, 131) slc_y = slice(3, 131) -#slc_x_2 = slice(3, 131, 2) -#slc_y_2 = slice(3, 131, 2) slc_x_2 = slice(2, 133, 2) slc_y_2 = slice(2, 133, 2) @@ -384,23 +382,25 @@ class ESPCN: conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_3', scale=scale) - conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_4', scale=scale) + # conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_4', scale=scale) - conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_5', scale=scale) + # conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_5', scale=scale) - # conv_b = tf.keras.layers.Conv2D(num_filters, kernel_size=3, strides=1, padding=padding, kernel_initializer=kernel_initializer)(conv_b) + conv_b = tf.keras.layers.Conv2D(num_filters, kernel_size=3, strides=1, padding=padding, activation=activation, kernel_initializer=kernel_initializer)(conv_b) conv = conv + conv_b - # conv = conv_b print(conv.shape) - conv = tf.keras.layers.Conv2D(IMG_DEPTH * (factor ** 2), 3, padding='same', activation=activation)(conv) + conv = tf.keras.layers.Conv2D(IMG_DEPTH * (factor ** 2), 3, padding=padding, activation=activation)(conv) + print(conv.shape) + + conv = tf.keras.layers.Conv2D(IMG_DEPTH * (factor ** 2), 3, padding=padding, activation=activation)(conv) print(conv.shape) conv = tf.nn.depth_to_space(conv, factor) print(conv.shape) - self.logits = tf.keras.layers.Conv2D(IMG_DEPTH, kernel_size=1, strides=1, padding=padding, activation=activation, name='regression')(conv) + self.logits = tf.keras.layers.Conv2D(IMG_DEPTH, kernel_size=1, strides=1, padding=padding, name='regression')(conv) print(self.logits.shape)