From e96e548c3f8eb854ec629405d4e9b4a3e72b858b Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Sun, 11 Dec 2022 10:57:09 -0600 Subject: [PATCH] snapshot.. --- modules/deeplearning/srcnn_l1b_l2.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/deeplearning/srcnn_l1b_l2.py b/modules/deeplearning/srcnn_l1b_l2.py index bad986d9..8073b882 100644 --- a/modules/deeplearning/srcnn_l1b_l2.py +++ b/modules/deeplearning/srcnn_l1b_l2.py @@ -24,12 +24,12 @@ else: NumLogits = NumClasses BATCH_SIZE = 128 -NUM_EPOCHS = 80 +NUM_EPOCHS = 60 TRACK_MOVING_AVERAGE = False EARLY_STOP = True -NOISE_TRAINING = True +NOISE_TRAINING = False NOISE_STDDEV = 0.001 DO_AUGMENT = True @@ -270,9 +270,9 @@ class SRCNN: else: if DO_ADD_NOISE: tmp = add_noise(tmp, noise_scale=NOISE_STDDEV) + tmp = np.where(tmp < 0.0, 0.0, tmp) + tmp = np.where(tmp > 1.0, 1.0, tmp) tmp = np.where(np.isnan(tmp), 0, tmp) - tmp = np.where(tmp < 0.0, 0.0, tmp) - tmp = np.where(tmp > 1.0, 1.0, tmp) tmp = resample_2d_linear(x_2, y_2, tmp, t, s) data_norm.append(tmp) # --------- @@ -408,7 +408,7 @@ class SRCNN: activation = tf.nn.relu momentum = 0.99 - num_filters = 128 + num_filters = 32 input_2d = self.inputs[0] print('input: ', input_2d.shape) @@ -740,7 +740,8 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): grd_c = resample_2d_linear_one(x_2, y_2, grd_c, t, s) print(grd_a.shape, grd_b.shape, grd_c.shape) - 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_c], axis=2) data = np.expand_dims(data, axis=0) nn = SRCNN() -- GitLab