From 34078a41ddf2d590650a0a2ebfd7808118309220 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=84=B8=ED=9D=AC/On-Device=20Lab=28SR=29/Princip?= =?utf8?q?al=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Mon, 24 Jun 2019 08:48:20 +0900 Subject: [PATCH] [moco/tf] revise test for shape inf bias (#3930) This will revise bias_shape accessors test in shape inference data Signed-off-by: SaeHie Park --- .../tf/src/Annotations/ShapeInferenceData.test.cpp | 30 +++++----------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/contrib/moco/lib/frontend/tf/src/Annotations/ShapeInferenceData.test.cpp b/contrib/moco/lib/frontend/tf/src/Annotations/ShapeInferenceData.test.cpp index ba292b6..700a340 100644 --- a/contrib/moco/lib/frontend/tf/src/Annotations/ShapeInferenceData.test.cpp +++ b/contrib/moco/lib/frontend/tf/src/Annotations/ShapeInferenceData.test.cpp @@ -101,37 +101,19 @@ TEST(TensorFlowFrontend, shapeinferencedata_filter) ASSERT_EQ(filter_g.depth(), 4); } -TEST(TensorFlowFrontend, shapeinferencedata_bias_set) +TEST(TensorFlowFrontend, shapeinferencedata_bias) { // Note: this may change when loco::BiasShape becomes available - loco_tobe::BiasShape bias; + loco_tobe::BiasShape bias_s; - bias = 3; + bias_s = 3; moco::tf::ShapeInferenceData shapedata; - shapedata.bias_shape(bias); + shapedata.bias_shape(bias_s); - ASSERT_EQ(shapedata.rank(), 1); - ASSERT_EQ(shapedata.dim(0), 3); -} - -TEST(TensorFlowFrontend, shapeinferencedata_bias_get) -{ - // Note: this may change when loco::BiasShape becomes available - - // This test is to check bias is stored in first dimension - // for normal case, we shouldn't access directly for bias - moco::tf::ShapeInferenceData shapedata; - loco_tobe::BiasShape dummy; - - shapedata.bias_shape(dummy); // this is to set domain to bias - - shapedata.rank(1); - shapedata.dim(0) = 3; - - loco_tobe::BiasShape bias = shapedata.bias_shape(); + loco_tobe::BiasShape bias_g = shapedata.bias_shape(); - ASSERT_EQ(bias, 3); + ASSERT_EQ(bias_g, 3); } -- 2.7.4