diff --git a/modules/deeplearning/srcnn_l1b_l2.py b/modules/deeplearning/srcnn_l1b_l2.py index bad986d987ab73c2a02dc989a23e871d38271677..8073b882e5ebcaeb9f9b7d812da7287264c52e76 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()