[moco/tf] revise test for shape inf bias (#3930)
author박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Sun, 23 Jun 2019 23:48:20 +0000 (08:48 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Sun, 23 Jun 2019 23:48:20 +0000 (08:48 +0900)
This will revise bias_shape accessors test in shape inference data

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
contrib/moco/lib/frontend/tf/src/Annotations/ShapeInferenceData.test.cpp

index ba292b6..700a340 100644 (file)
@@ -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);
 }