ASSERT_EQ(tensor.dim(3), 4);
}
-TEST(TensorFlowFrontend, shapeinferencedata_feature_set)
+TEST(TensorFlowFrontend, shapeinferencedata_feature)
{
- loco::FeatureShape feature;
+ loco::FeatureShape feature_s;
- feature.count() = 1;
- feature.height() = 2;
- feature.width() = 3;
- feature.depth() = 4;
+ feature_s.count() = 1;
+ feature_s.height() = 2;
+ feature_s.width() = 3;
+ feature_s.depth() = 4;
moco::tf::ShapeInferenceData shapedata;
- shapedata.feature_shape(feature);
+ shapedata.feature_shape(feature_s);
- ASSERT_EQ(shapedata.rank(), 4);
- ASSERT_EQ(shapedata.dim(0), 1);
- ASSERT_EQ(shapedata.dim(1), 2);
- ASSERT_EQ(shapedata.dim(2), 3);
- ASSERT_EQ(shapedata.dim(3), 4);
-}
-
-TEST(TensorFlowFrontend, shapeinferencedata_feature_get)
-{
- moco::tf::ShapeInferenceData shapedata;
- loco::FeatureShape dummy;
-
- shapedata.feature_shape(dummy); // this is to set domain to feature
-
- shapedata.rank(4);
- shapedata.dim(0) = 1;
- shapedata.dim(1) = 2;
- shapedata.dim(2) = 3;
- shapedata.dim(3) = 4;
-
- loco::FeatureShape feature = shapedata.feature_shape();
+ loco::FeatureShape feature_g = shapedata.feature_shape();
- ASSERT_EQ(feature.count(), 1);
- ASSERT_EQ(feature.height(), 2);
- ASSERT_EQ(feature.width(), 3);
- ASSERT_EQ(feature.depth(), 4);
+ ASSERT_EQ(feature_g.count(), 1);
+ ASSERT_EQ(feature_g.height(), 2);
+ ASSERT_EQ(feature_g.width(), 3);
+ ASSERT_EQ(feature_g.depth(), 4);
}
TEST(TensorFlowFrontend, shapeinferencedata_filter)