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

snapshot...

parent 221c1fdc
Branches
No related tags found
No related merge requests found
...@@ -73,7 +73,7 @@ print('data_params_full: ', data_params_full) ...@@ -73,7 +73,7 @@ print('data_params_full: ', data_params_full)
print('label_param: ', label_param) print('label_param: ', label_param)
KERNEL_SIZE = 3 KERNEL_SIZE = 3
X_LEN = Y_LEN = 64 X_LEN = Y_LEN = 128
if KERNEL_SIZE == 3: if KERNEL_SIZE == 3:
slc_x = slice(0, int(X_LEN/4) + 2) slc_x = slice(0, int(X_LEN/4) + 2)
...@@ -911,13 +911,14 @@ def run_restore_static(directory, ckpt_dir, out_file=None): ...@@ -911,13 +911,14 @@ def run_restore_static(directory, ckpt_dir, out_file=None):
nn = SRCNN() nn = SRCNN()
labels, preds, inputs = nn.run_restore(directory, ckpt_dir) labels, preds, inputs = nn.run_restore(directory, ckpt_dir)
if out_file is not None: if out_file is not None:
y_hi, x_hi = (Y_LEN // 4) + 1, (X_LEN // 4) + 1
np.save(out_file, np.save(out_file,
[np.squeeze(labels), preds.argmax(axis=3), [np.squeeze(labels), preds.argmax(axis=3),
denormalize(inputs[:, 1:17, 1:17, 0], 'temp_11_0um_nom', mean_std_dct), denormalize(inputs[:, 1:y_hi, 1:x_hi, 0], 'temp_11_0um_nom', mean_std_dct),
denormalize(inputs[:, 1:17, 1:17, 1], 'refl_0_65um_nom', mean_std_dct), denormalize(inputs[:, 1:y_hi, 1:x_hi, 1], 'refl_0_65um_nom', mean_std_dct),
denormalize(inputs[:, 1:17, 1:17, 2], 'refl_0_65um_nom', mean_std_dct), denormalize(inputs[:, 1:y_hi, 1:x_hi, 2], 'refl_0_65um_nom', mean_std_dct),
inputs[:, 1:17, 1:17, 3], inputs[:, 1:y_hi, 1:x_hi, 3],
inputs[:, 1:17, 1:17, 4]]) inputs[:, 1:y_hi, 1:x_hi, 4]])
def run_evaluate_static(in_file, out_file, ckpt_dir): def run_evaluate_static(in_file, out_file, ckpt_dir):
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment