@@ -16,34 +16,44 @@ using namespace ngraph;
1616using ngraph::test::NodeBuilder;
1717using ngraph::test::ValueMap;
1818
19- template <class T >
20- class BatchNormAttrTest : public ::testing::Test {};
21-
22- TYPED_TEST_SUITE_P (BatchNormAttrTest);
23-
24- TYPED_TEST_P (BatchNormAttrTest, batch_norm_inference_op) {
19+ TEST (attributes, batch_norm_inference_op_v5) {
2520 PartialShape in_shape{1 , 10 };
2621 PartialShape ch_shape{in_shape[1 ]};
2722 element::Type et = element::f32 ;
2823 double epsilon = 0.001 ;
2924
30- NodeBuilder::get_ops ().register_factory <TypeParam >();
25+ NodeBuilder::get_ops ().register_factory <op::v5::BatchNormInference >();
3126 auto data_batch = make_shared<op::Parameter>(et, in_shape);
3227 auto gamma = make_shared<op::Parameter>(et, ch_shape);
3328 auto beta = make_shared<op::Parameter>(et, ch_shape);
3429 auto mean = make_shared<op::Parameter>(et, ch_shape);
3530 auto var = make_shared<op::Parameter>(et, ch_shape);
36- auto batch_norm = make_shared<TypeParam >(data_batch, gamma, beta, mean, var, epsilon);
31+ auto batch_norm = make_shared<op::v5::BatchNormInference >(data_batch, gamma, beta, mean, var, epsilon);
3732
3833 const auto expected_attr_count = 1 ;
39- NodeBuilder builder (batch_norm);
34+ NodeBuilder builder (batch_norm, {data_batch, gamma, beta, mean, var} );
4035 EXPECT_EQ (builder.get_value_map_size (), expected_attr_count);
41- auto g_batch_norm = ov::as_type_ptr<TypeParam >(builder.create ());
36+ auto g_batch_norm = ov::as_type_ptr<op::v5::BatchNormInference >(builder.create ());
4237 EXPECT_EQ (g_batch_norm->get_eps_value (), batch_norm->get_eps_value ());
4338}
4439
45- REGISTER_TYPED_TEST_SUITE_P (BatchNormAttrTest, batch_norm_inference_op);
40+ TEST (attributes, batch_norm_inference_op_v0) {
41+ PartialShape in_shape{1 , 10 };
42+ PartialShape ch_shape{in_shape[1 ]};
43+ element::Type et = element::f32 ;
44+ double epsilon = 0.001 ;
4645
47- using Types = ::testing::Types<op::v0::BatchNormInference, op::v5::BatchNormInference>;
46+ NodeBuilder::get_ops ().register_factory <op::v0::BatchNormInference>();
47+ auto data_batch = make_shared<op::Parameter>(et, in_shape);
48+ auto gamma = make_shared<op::Parameter>(et, ch_shape);
49+ auto beta = make_shared<op::Parameter>(et, ch_shape);
50+ auto mean = make_shared<op::Parameter>(et, ch_shape);
51+ auto var = make_shared<op::Parameter>(et, ch_shape);
52+ auto batch_norm = make_shared<op::v0::BatchNormInference>(data_batch, gamma, beta, mean, var, epsilon);
4853
49- INSTANTIATE_TYPED_TEST_SUITE_P (attributes, BatchNormAttrTest, Types);
54+ const auto expected_attr_count = 1 ;
55+ NodeBuilder builder (batch_norm, {gamma, beta, data_batch, mean, var});
56+ EXPECT_EQ (builder.get_value_map_size (), expected_attr_count);
57+ auto g_batch_norm = ov::as_type_ptr<op::v0::BatchNormInference>(builder.create ());
58+ EXPECT_EQ (g_batch_norm->get_eps_value (), batch_norm->get_eps_value ());
59+ }
0 commit comments