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

snapshot...

parent ca0b5f54
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,6 @@ NOISE_TRAINING = False ...@@ -37,7 +37,6 @@ NOISE_TRAINING = False
NOISE_STDDEV = 0.01 NOISE_STDDEV = 0.01
DO_AUGMENT = True DO_AUGMENT = True
DO_SMOOTH = True
SIGMA = 1.0 SIGMA = 1.0
DO_ZERO_OUT = False DO_ZERO_OUT = False
DO_ESPCN = False # Note: If True, cannot do mixed resolution input fields (Adjust accordingly below) DO_ESPCN = False # Note: If True, cannot do mixed resolution input fields (Adjust accordingly below)
...@@ -374,8 +373,6 @@ class SRCNN: ...@@ -374,8 +373,6 @@ class SRCNN:
else: # Half res upsampled to full res: else: # Half res upsampled to full res:
tmp = upsample(tmp) tmp = upsample(tmp)
tmp = normalize(tmp, param, mean_std_dct) tmp = normalize(tmp, param, mean_std_dct)
if DO_ADD_NOISE:
tmp = add_noise(tmp, noise_scale=NOISE_STDDEV)
data_norm.append(tmp) data_norm.append(tmp)
for param in data_params_full: for param in data_params_full:
...@@ -386,8 +383,6 @@ class SRCNN: ...@@ -386,8 +383,6 @@ class SRCNN:
# Full res: # Full res:
tmp = tmp[:, slc_y, slc_x] tmp = tmp[:, slc_y, slc_x]
tmp = normalize(tmp, param, mean_std_dct) tmp = normalize(tmp, param, mean_std_dct)
if DO_ADD_NOISE:
tmp = add_noise(tmp, noise_scale=NOISE_STDDEV)
data_norm.append(tmp) data_norm.append(tmp)
# --------------------------------------------------- # ---------------------------------------------------
tmp = input_data[:, label_idx, :, :] tmp = input_data[:, label_idx, :, :]
...@@ -401,13 +396,6 @@ class SRCNN: ...@@ -401,13 +396,6 @@ class SRCNN:
tmp = tmp[:, slc_y, slc_x] tmp = tmp[:, slc_y, slc_x]
if label_param != 'cloud_probability': if label_param != 'cloud_probability':
tmp = normalize(tmp, label_param, mean_std_dct) tmp = normalize(tmp, label_param, mean_std_dct)
if DO_ADD_NOISE:
tmp = add_noise(tmp, noise_scale=NOISE_STDDEV)
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)
data_norm.append(tmp) data_norm.append(tmp)
# --------- # ---------
data = np.stack(data_norm, axis=3) data = np.stack(data_norm, axis=3)
......
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