diff --git a/modules/deeplearning/srcnn_l1b_l2.py b/modules/deeplearning/srcnn_l1b_l2.py index fed7d621e316c1347f2439fa53c57ed625c7fccc..3457cfa32daa42e3b20c5b01af0c85706e8c81dd 100644 --- a/modules/deeplearning/srcnn_l1b_l2.py +++ b/modules/deeplearning/srcnn_l1b_l2.py @@ -66,14 +66,8 @@ y_134 = np.arange(134) x_64 = np.arange(64) y_64 = np.arange(64) -x_134_2 = slice(3, 131, 2) -y_134_2 = slice(3, 131, 2) -# x_134_2 = x_134[3:131:2] -# y_134_2 = y_134[3:131:2] - -t = np.arange(0, 64, 0.5) -s = np.arange(0, 64, 0.5) - +# x_134_2 = slice(3, 131, 2) +# y_134_2 = slice(3, 131, 2) x_128_2 = slice(3, 131, 2) y_128_2 = slice(3, 131, 2) x_128 = slice(3, 131) @@ -85,17 +79,22 @@ y_128 = slice(3, 131) # y_128 = y_134[3:131] -#----------- New -# x_134_2 = x_134[1:134:2] -# y_134_2 = y_134[1:134:2] -# t = np.arange(1, 66, 0.5) -# s = np.arange(1, 66, 0.5) -#-------------------------- +x_134_2 = slice(1, 134, 2) +y_134_2 = slice(1, 134, 2) -slc_x_2 = x_128_2 -slc_y_2 = y_128_2 +# slc_x_2 = x_128_2 +# slc_y_2 = y_128_2 +# slc_x = x_128 +# slc_y = y_128 +# t = np.arange(0, 64, 0.5) +# s = np.arange(0, 64, 0.5) + +slc_x_2 = x_134_2 +slc_y_2 = y_134_2 slc_x = x_128 slc_y = y_128 +t = np.arange(1, 66, 0.5) +s = np.arange(1, 66, 0.5) def build_residual_conv2d_block(conv, num_filters, block_name, activation=tf.nn.relu, padding='SAME', @@ -406,9 +405,10 @@ class SRCNN: input_2d = self.inputs[0] print('input: ', input_2d.shape) - # conv = tf.keras.layers.Conv2D(num_filters, kernel_size=5, strides=1, padding='VALID', activation=None)(input_2d) - conv = input_2d - print('input: ', conv.shape) + input_2d = tf.keras.layers.Conv2D(num_filters, kernel_size=3, strides=1, padding='VALID', activation=None)(input_2d) + # conv = input_2d + # print('input: ', conv.shape) + print('input: ', input_2d.shape) conv = conv_b = tf.keras.layers.Conv2D(num_filters, kernel_size=3, kernel_initializer='he_uniform', activation=activation, padding='SAME')(input_2d) print(conv.shape)