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

snapshot...

parent ccca588e
No related branches found
No related tags found
No related merge requests found
......@@ -61,8 +61,10 @@ label_param = label_params[label_idx]
x_70 = np.arange(70)
y_70 = np.arange(70)
x_70_2 = x_70[3:67:2]
y_70_2 = y_70[3:67:2]
#x_70_2 = x_70[3:67:2]
#y_70_2 = y_70[3:67:2]
x_70_2 = x_70[2:68:2]
y_70_2 = y_70[2:68:2]
def build_residual_conv2d_block(conv, num_filters, block_name, activation=tf.nn.leaky_relu, padding='SAME'):
......@@ -177,7 +179,7 @@ class ESPCN:
self.X_img = tf.keras.Input(shape=(None, None, self.n_chans))
# self.X_img = tf.keras.Input(shape=(36, 36, self.n_chans))
self.X_img = tf.keras.Input(shape=(32, 32, self.n_chans))
# self.X_img = tf.keras.Input(shape=(34, 34, self.n_chans))
# self.X_img = tf.keras.Input(shape=(66, 66, self.n_chans))
self.inputs.append(self.X_img)
......@@ -204,8 +206,8 @@ class ESPCN:
data = np.expand_dims(data, axis=3)
# label = label[:, label_idx, :, :]
# label = label[:, label_idx, 3:67:2, 3:67:2]
label = label[:, label_idx, 3:67, 3:67]
label = label[:, label_idx, 3:67:2, 3:67:2]
# label = label[:, label_idx, 3:67, 3:67]
label = np.expand_dims(label, axis=3)
data = data.astype(np.float32)
......@@ -349,8 +351,8 @@ class ESPCN:
conv = input_2d
print('input: ', conv.shape)
conv = conv_b = tf.keras.layers.Conv2D(num_filters, kernel_size=3, padding=padding)(input_2d)
# conv = conv_b = tf.keras.layers.Conv2D(num_filters, kernel_size=3, padding='VALID')(input_2d)
# conv = conv_b = tf.keras.layers.Conv2D(num_filters, kernel_size=3, padding=padding)(input_2d)
conv = conv_b = tf.keras.layers.Conv2D(num_filters, kernel_size=3, padding='VALID')(input_2d)
print(conv.shape)
if NOISE_TRAINING:
......@@ -369,11 +371,10 @@ class ESPCN:
conv = conv + conv_b
print(conv.shape)
conv = tf.keras.layers.Conv2D(num_filters * (factor ** 2), 3, padding='same')(conv)
# conv = tf.keras.layers.Conv2D((factor ** 2), 3, padding='same')(conv)
# conv = tf.keras.layers.Conv2D(num_filters * (factor ** 2), 3, padding='same')(conv)
print(conv.shape)
conv = tf.nn.depth_to_space(conv, factor)
#conv = tf.nn.depth_to_space(conv, factor)
print(conv.shape)
self.logits = tf.keras.layers.Conv2D(1, kernel_size=3, strides=1, padding=padding, name='regression')(conv)
......
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