amd
/

ONNX
PyTorch
English
RyzenAI
super resolution
SISR
lynnlyx commited on
Commit
0199250
1 Parent(s): 2071132

change to NHWC

Browse files
Files changed (1) hide show
  1. 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