Front-pad 4dShapes instead of back-pad (#5299)
authorАндрей Шедько/AI Tools Lab /SRR/Engineer/삼성전자 <a.shedko@samsung.com>
Wed, 29 May 2019 04:33:19 +0000 (07:33 +0300)
committer박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Wed, 29 May 2019 04:33:19 +0000 (13:33 +0900)
Front-pad 4dShapes instead of back-pad

Signed-off-by: Andrei Shedko <a.shedko@samsung.com>
runtimes/neurun/core/src/graph/operand/Shape4DConvert.h

index d5931cb..9b8d44e 100644 (file)
@@ -34,13 +34,13 @@ inline LowerInfo::Shape4D asShape4D(const model::Shape &shape)
       return LowerInfo::Shape4D(1, 1, 1, 1);
 
     case 1u:
-      return LowerInfo::Shape4D(shape.dim(0), 1, 1, 1);
+      return LowerInfo::Shape4D(1, 1, 1, shape.dim(0));
 
     case 2u:
-      return LowerInfo::Shape4D(shape.dim(0), shape.dim(1), 1, 1);
+      return LowerInfo::Shape4D(1, 1, shape.dim(0), shape.dim(1));
 
     case 3u:
-      return LowerInfo::Shape4D(shape.dim(0), shape.dim(1), shape.dim(2), 1);
+      return LowerInfo::Shape4D(1, shape.dim(0), shape.dim(1), shape.dim(2));
 
     case 4u:
       return LowerInfo::Shape4D(shape.dim(0), shape.dim(1), shape.dim(2), shape.dim(3));