change to NHWC
Browse files- 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
|