diff --git a/modules/deeplearning/espcn.py b/modules/deeplearning/espcn.py index 40dce3c3f11aa93222b6b478a5346adf10c8f4d2..b99843c65a4d280d31c85f81ae24ef8163ce6ce0 100644 --- a/modules/deeplearning/espcn.py +++ b/modules/deeplearning/espcn.py @@ -60,7 +60,7 @@ data_param = data_params[data_idx] label_param = label_params[label_idx] -def build_conv2d_block(conv, num_filters, block_name, activation=tf.nn.leaky_relu, padding='SAME'): +def build_residual_conv2d_block(conv, num_filters, block_name, activation=tf.nn.leaky_relu, padding='SAME'): with tf.name_scope(block_name): skip = tf.keras.layers.Conv2D(num_filters, kernel_size=3, strides=1, padding=padding, activation=activation)(conv) @@ -349,13 +349,13 @@ class ESPCN: if NOISE_TRAINING: conv = conv_b = tf.keras.layers.GaussianNoise(stddev=NOISE_STDDEV)(conv) - conv_b = build_conv2d_block(conv_b, num_filters, 'Residual_Block_1') + conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_1') - conv_b = build_conv2d_block(conv_b, num_filters, 'Residual_Block_2') + conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_2') - conv_b = build_conv2d_block(conv_b, num_filters, 'Residual_Block_3') + conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_3') - conv_b = build_conv2d_block(conv_b, num_filters, 'Residual_Block_4') + conv_b = build_residual_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)