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

snapshot...

parent ae996d3e
No related branches found
No related tags found
No related merge requests found
...@@ -213,7 +213,7 @@ class SRCNN: ...@@ -213,7 +213,7 @@ class SRCNN:
self.test_label_nda = None self.test_label_nda = None
# self.n_chans = len(data_params) + 2 # self.n_chans = len(data_params) + 2
self.n_chans = 2 self.n_chans = 1
self.X_img = tf.keras.Input(shape=(None, None, self.n_chans)) 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))
...@@ -246,18 +246,18 @@ class SRCNN: ...@@ -246,18 +246,18 @@ class SRCNN:
DO_ADD_NOISE = True DO_ADD_NOISE = True
data_norm = [] data_norm = []
for param in data_params: # for param in data_params:
idx = params.index(param) # idx = params.index(param)
tmp = input_data[:, idx, :, :] # tmp = input_data[:, idx, :, :]
tmp = np.where(np.isnan(tmp), 0, tmp) # tmp = np.where(np.isnan(tmp), 0, tmp)
tmp = smooth_2d(tmp, sigma=1.0) # tmp = smooth_2d(tmp, sigma=1.0)
tmp = tmp[:, slc_y_2, slc_x_2] # tmp = tmp[:, slc_y_2, slc_x_2]
tmp = resample_2d_linear(x_2, y_2, tmp, t, s) # tmp = resample_2d_linear(x_2, y_2, tmp, t, s)
tmp = tmp[:, y_k, x_k] # tmp = tmp[:, y_k, x_k]
tmp = normalize(tmp, param, mean_std_dct) # tmp = normalize(tmp, param, mean_std_dct)
if DO_ADD_NOISE: # if DO_ADD_NOISE:
tmp = add_noise(tmp, noise_scale=NOISE_STDDEV) # tmp = add_noise(tmp, noise_scale=NOISE_STDDEV)
data_norm.append(tmp) # data_norm.append(tmp)
# # -------------------------- # # --------------------------
# param = 'refl_0_65um_nom' # param = 'refl_0_65um_nom'
# idx = params.index(param) # idx = params.index(param)
...@@ -777,7 +777,8 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): ...@@ -777,7 +777,8 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
grd_c = normalize(grd_c, label_param, mean_std_dct) grd_c = normalize(grd_c, label_param, mean_std_dct)
# data = np.stack([grd_a, grd_b, grd_c], axis=2) # data = np.stack([grd_a, grd_b, grd_c], axis=2)
data = np.stack([grd_a, grd_c], axis=2) #data = np.stack([grd_a, grd_c], axis=2)
data = np.stack([grd_c], axis=2)
data = np.expand_dims(data, axis=0) data = np.expand_dims(data, axis=0)
nn = SRCNN() nn = SRCNN()
......
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