Commit
•
ca4a8f1
1
Parent(s):
2071132
change to NHWC (#1)
Browse files- change to NHWC (0199250c3742b11ba3fed32b1e8226d019e75689)
Co-authored-by: liu <lynnlyx@users.noreply.huggingface.co>
- data/data_tiling.py +4 -1
data/data_tiling.py
CHANGED
@@ -24,7 +24,10 @@ def tiling_inference(session, lr, overlapping, patch_size):
|
|
24 |
w_idx = w_idx if w_idx + patch_size[1] <= w else w - patch_size[1]
|
25 |
|
26 |
tilling_lr = lr[..., h_idx: h_idx+patch_size[0], w_idx: w_idx+patch_size[1]]
|
27 |
-
sr_tiling = session.run(None, {session.get_inputs()[0].name: tilling_lr})[0]
|
|
|
|
|
|
|
28 |
|
29 |
left, right, top, bottom = 0, patch_size[1], 0, patch_size[0]
|
30 |
left += overlapping//2
|
|
|
24 |
w_idx = w_idx if w_idx + patch_size[1] <= w else w - patch_size[1]
|
25 |
|
26 |
tilling_lr = lr[..., h_idx: h_idx+patch_size[0], w_idx: w_idx+patch_size[1]]
|
27 |
+
sr_tiling = session.run(None, {session.get_inputs()[0].name: tilling_lr.transpose(0,2,3,1)})[0].transpose(0,3,1,2)
|
28 |
+
|
29 |
+
left, right, top, bottom = 0, patch_size[1], 0, patch_size[0]
|
30 |
+
left += overlapping//2
|
31 |
|
32 |
left, right, top, bottom = 0, patch_size[1], 0, patch_size[0]
|
33 |
left += overlapping//2
|