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

snapshot...

parent 3e5be759
Branches
No related tags found
No related merge requests found
...@@ -693,6 +693,7 @@ class SRCNN: ...@@ -693,6 +693,7 @@ class SRCNN:
pred = self.model([data], training=False) pred = self.model([data], training=False)
self.test_probs = pred self.test_probs = pred
pred = pred.numpy() pred = pred.numpy()
print('**: ', pred.shape, pred.min(), pred.max())
return pred return pred
...@@ -774,19 +775,29 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): ...@@ -774,19 +775,29 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
# grd_c = gaussian_filter(grd_c, sigma=1.0) # grd_c = gaussian_filter(grd_c, sigma=1.0)
grd_c = grd_c[y_0:y_0+sub_y, x_0:x_0+sub_x] grd_c = grd_c[y_0:y_0+sub_y, x_0:x_0+sub_x]
grd_c = grd_c.copy() grd_c = grd_c.copy()
print(grd_c.shape)
grd_c = np.where(np.isnan(grd_c), 0, grd_c) grd_c = np.where(np.isnan(grd_c), 0, grd_c)
hr_grd_c = grd_c.copy() hr_grd_c = grd_c.copy()
hr_grd_c = hr_grd_c[y_128, x_128] hr_grd_c = hr_grd_c[y_128, x_128]
print(hr_grd_c.shape)
grd_c = grd_c[slc_y_2, slc_x_2] grd_c = grd_c[slc_y_2, slc_x_2]
print(grd_c.shape)
grd_c = resample_2d_linear_one(x_2, y_2, grd_c, t, s) grd_c = resample_2d_linear_one(x_2, y_2, grd_c, t, s)
print(grd_c.shape)
grd_c = grd_c[y_k, x_k] grd_c = grd_c[y_k, x_k]
print(grd_c.shape)
if label_param != 'cloud_probability': if label_param != 'cloud_probability':
grd_c = normalize(grd_c, label_param, mean_std_dct) grd_c = normalize(grd_c, label_param, mean_std_dct)
print(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_a, grd_c], axis=2) #data = np.stack([grd_a, grd_c], axis=2)
data = np.stack([grd_c], axis=2) data = np.stack([grd_c], axis=2)
print(data.shape)
data = np.expand_dims(data, axis=0) data = np.expand_dims(data, axis=0)
print(data.shape)
dn = denormalize(grd_c, label_param, mean_std_dct)
return hr_grd_c, grd_c, dn
nn = SRCNN() nn = SRCNN()
out_sr = nn.run_evaluate(data, ckpt_dir) out_sr = nn.run_evaluate(data, ckpt_dir)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment