diff --git a/modules/deeplearning/icing_cnn.py b/modules/deeplearning/icing_cnn.py index 818f2f49607d231a27d9c0efdcfad2c6054958af..904779689ad1d1d53f67225741cd11f10c783189 100644 --- a/modules/deeplearning/icing_cnn.py +++ b/modules/deeplearning/icing_cnn.py @@ -27,6 +27,8 @@ EARLY_STOP = True TRIPLET = False CONV3D = False +NOISE_TRAINING = False + img_width = 16 mean_std_file = homedir+'data/icing/mean_std_l1b_no_ice.pkl' @@ -211,7 +213,10 @@ class IcingIntensityNN: data = [] for param in train_params: nda = h5f[param][nd_idxs, ] - nda = normalize(nda, param, mean_std_dct) + if NOISE_TRAINING and is_training: + nda = normalize(nda, param, mean_std_dct, add_noise=True, noise_scale=0.01, seed=42) + else: + nda = normalize(nda, param, mean_std_dct) data.append(nda) data = np.stack(data) data = data.astype(np.float32)