From 56b56724c1e20db875a11979cd2903bd58bd9087 Mon Sep 17 00:00:00 2001 From: Dominic Symes Date: Fri, 9 Oct 2020 12:00:41 +0100 Subject: Fix errors in RESIZE Fix typing errors in the resize operation and simplify the assert checking. Signed-off-by: Dominic Symes Change-Id: If12b9e54a6e9f84f0d6122be7d4a4b567fd81e0f --- chapters/image.adoc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/chapters/image.adoc b/chapters/image.adoc index 1e8974c..c3cd390 100644 --- a/chapters/image.adoc +++ b/chapters/image.adoc @@ -36,32 +36,32 @@ None [source,c] ---- assert(00 && stride_y>0); for_each (0<=n> shift; dy = y - (iy<> shift; dx = x - (ix<(input, [N,IH,IW,C], [n,iy0,ix0,c]) v01 = tensor_read(input, [N,IH,IW,C], [n,iy0,ix1,c]) v10 = tensor_read(input, [N,IH,IW,C], [n,iy1,ix0,c]) v11 = tensor_read(input, [N,IH,IW,C], [n,iy1,ix1,c]) - acc_t acc = v00*((1<(output, [N,OH,OW,C], [n,oy,ox,c], acc) + tensor_write(output, [N,OH,OW,C], [n,oy,ox,c], acc) } else if (mode==NEAREST) { iy = (dy>>(shift-1))!=0 ? iy1 : iy0; ix = (dx>>(shift-1))!=0 ? ix1 : ix0; v = tensor_read(input, [N,IH,IW,C], [n,iy,ix,c]); - tensor_write(output, [N,OH,OW,C], [n,oy,ox,c], v) + tensor_write(output, [N,OH,OW,C], [n,oy,ox,c], v) } } ---- -- cgit v1.2.1