Shape inference unit test fix (#972)
authorEfimov Alexander/AI Tools Lab/./Samsung Electronics <a.efimov@samsung.com>
Mon, 13 Aug 2018 10:25:24 +0000 (13:25 +0300)
committerSergey Vostokov/AI Tools Lab /SRR/Staff Engineer/삼성전자 <s.vostokov@samsung.com>
Mon, 13 Aug 2018 10:25:24 +0000 (13:25 +0300)
Add absent dimensions into input data shape

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
contrib/nnc/unittests/core/ShapeInference.cpp

index 3c35684..714443c 100644 (file)
@@ -48,10 +48,8 @@ TEST(ShapeInferenceTest, ReshapeAutoDimensionVaryRank) {
   si.visit(n, *static_cast<ops::ReshapeOp*>(n->getOperation()));
   ASSERT_EQ(resultShapeShrink, n->getOperation()->getOutputShape(0));
 
-#if 0
   // test expansion
-  n->getOperation()->setOutputShape(0, Shape{5, ShapeInference::AUTO_DIM});
+  n->getOperation()->setOutputShape(0, Shape{5, ShapeInference::AUTO_DIM, 2, 2});
   si.visit(n, *static_cast<ops::ReshapeOp*>(n->getOperation()));
   ASSERT_EQ(resultShapeExpand, n->getOperation()->getOutputShape(0));
-#endif
 }