Skip to content
Snippets Groups Projects
Commit 4dc27d7b authored by tomrink's avatar tomrink
Browse files

snapshot..

parent 3f703ef0
No related branches found
No related tags found
No related merge requests found
...@@ -62,30 +62,30 @@ label_idx = params.index(label_param) ...@@ -62,30 +62,30 @@ label_idx = params.index(label_param)
print('data_params: ', data_params) print('data_params: ', data_params)
print('label_param: ', label_param) print('label_param: ', label_param)
# Kernel size: 3, target size: (128, 128) KERNEL_SIZE = 3 # target size: (128, 128)
slc_x = slice(2, 132)
slc_y = slice(2, 132) if KERNEL_SIZE == 3:
slc_x_2 = slice(1, 134, 2) slc_x = slice(2, 132)
slc_y_2 = slice(1, 134, 2) slc_y = slice(2, 132)
x_128 = slice(3, 131) slc_x_2 = slice(1, 134, 2)
y_128 = slice(3, 131) slc_y_2 = slice(1, 134, 2)
t = np.arange(1, 66, 0.5) x_128 = slice(3, 131)
s = np.arange(1, 66, 0.5) y_128 = slice(3, 131)
x_2 = np.arange(67) t = np.arange(1, 66, 0.5)
y_2 = np.arange(67) s = np.arange(1, 66, 0.5)
# ---------------------------------------- x_2 = np.arange(67)
y_2 = np.arange(67)
# Kernel size: 5, target_size: (128, 128) elif KERNEL_SIZE == 5:
# slc_x = slice(3, 135) slc_x = slice(3, 135)
# slc_y = slice(3, 135) slc_y = slice(3, 135)
# slc_x_2 = slice(2, 137, 2) slc_x_2 = slice(2, 137, 2)
# slc_y_2 = slice(2, 137, 2) slc_y_2 = slice(2, 137, 2)
# x_128 = slice(5, 133) x_128 = slice(5, 133)
# y_128 = slice(5, 133) y_128 = slice(5, 133)
# t = np.arange(1, 67, 0.5) t = np.arange(1, 67, 0.5)
# s = np.arange(1, 67, 0.5) s = np.arange(1, 67, 0.5)
# x_2 = np.arange(68) x_2 = np.arange(68)
# y_2 = np.arange(68) y_2 = np.arange(68)
# ---------------------------------------- # ----------------------------------------
...@@ -412,7 +412,7 @@ class SRCNN: ...@@ -412,7 +412,7 @@ class SRCNN:
input_2d = self.inputs[0] input_2d = self.inputs[0]
print('input: ', input_2d.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='VALID')(input_2d) conv = conv_b = tf.keras.layers.Conv2D(num_filters, kernel_size=KERNEL_SIZE, kernel_initializer='he_uniform', activation=activation, padding='VALID')(input_2d)
print(conv.shape) print(conv.shape)
# if NOISE_TRAINING: # if NOISE_TRAINING:
...@@ -420,15 +420,15 @@ class SRCNN: ...@@ -420,15 +420,15 @@ class SRCNN:
scale = 0.2 scale = 0.2
conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_1', kernel_size=3, scale=scale) conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_1', kernel_size=KERNEL_SIZE, scale=scale)
conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_2', kernel_size=3, scale=scale) conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_2', kernel_size=KERNEL_SIZE, scale=scale)
conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_3', kernel_size=3, scale=scale) 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=3, 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=3, scale=scale) #conv_b = build_residual_conv2d_block(conv_b, num_filters, 'Residual_Block_5', kernel_size=KERNEL_SIZE, scale=scale)
conv_b = tf.keras.layers.Conv2D(num_filters, kernel_size=3, strides=1, activation=activation, kernel_initializer='he_uniform', padding=padding)(conv_b) conv_b = tf.keras.layers.Conv2D(num_filters, kernel_size=3, strides=1, activation=activation, kernel_initializer='he_uniform', padding=padding)(conv_b)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment