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

snapshot

parent 8d81f008
Branches
No related tags found
No related merge requests found
......@@ -211,7 +211,7 @@ class ESPCN:
self.n_chans = 1
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=(36, 36, self.n_chans))
# self.X_img = tf.keras.Input(shape=(32, 32, self.n_chans))
self.inputs.append(self.X_img)
......@@ -236,13 +236,14 @@ class ESPCN:
label = np.concatenate(label_s)
# label = label[:, label_idx, :, :]
label = label[:, label_idx, 4:68, 4:68]
label = label[:, label_idx, 3:67, 3:67]
label = np.expand_dims(label, axis=3)
data = data[:, data_idx, :, :]
# data = data[:, data_idx, :, :]
data = data[:, data_idx, 3:67, 3:67]
data = np.expand_dims(data, axis=3)
# data = tf.image.resize(data, (32, 32)).numpy()
data = tf.image.resize(data, (36, 36)).numpy()
data = tf.image.resize(data, (32, 32)).numpy()
# data = tf.image.resize(data, (36, 36)).numpy()
data = data.astype(np.float32)
label = label.astype(np.float32)
......@@ -383,8 +384,8 @@ class ESPCN:
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
# 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)
skip = conv
......@@ -818,6 +819,7 @@ def prepare(param_idx=1, filename='/Users/tomrink/data_valid_40.npy'):
nda = np.load(filename)
nda = nda[:, param_idx, :, :]
nda = np.expand_dims(nda, axis=3)
# nda_lr = tf.image.resize(nda, (36, 36)).numpy()
nda_lr = tf.image.resize(nda, (32, 32)).numpy()
return nda_lr
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment