Skip to content
Snippets Groups Projects
Commit 7abcf11a authored by tomrink's avatar tomrink
Browse files

add denorm method

parent 0814369f
No related branches found
No related tags found
No related merge requests found
......@@ -408,6 +408,23 @@ def normalize(data, param, mean_std_dict, add_noise=False, noise_scale=1.0, seed
return data
def denormalize(data, param, mean_std_dict):
if mean_std_dict.get(param) is None:
return data
shape = data.shape
data = data.flatten()
mean, std, lo, hi = mean_std_dict.get(param)
data *= std
data += mean
data = np.reshape(data, shape)
return data
def scale(data, param, mean_std_dict):
if mean_std_dict.get(param) is None:
......
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