Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a96e05c

Browse files
committedJun 22, 2021
Add Swish unsupported parameter data type test cases.
Signed-off-by: Luwei Zhou <luwei.zhou@intel.com>
1 parent 697d7c3 commit a96e05c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
 

‎ngraph/test/type_prop/swish.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,17 @@ TEST(type_prop, swish_2_inputs)
8181
ASSERT_TRUE(swish_func->get_output_partial_shape(0).same_scheme(data->get_output_shape(0)));
8282
ASSERT_TRUE(swish_func->get_output_partial_shape(0).rank().is_static());
8383
}
84+
85+
TEST(type_prop, swish_incompatible_type_boolean)
86+
{
87+
auto data = make_shared<op::Parameter>(element::boolean, Shape{1, 3, 6});
88+
auto beta = make_shared<op::Parameter>(element::f32, Shape{});
89+
ASSERT_THROW(make_shared<op::v4::Swish>(data, beta);, ngraph::NodeValidationFailure);
90+
}
91+
92+
TEST(type_prop, swish_incompatible_types_u32)
93+
{
94+
auto data = make_shared<op::Parameter>(element::f32, Shape{1, 3, 6});
95+
auto beta = make_shared<op::Parameter>(element::u32, Shape{});
96+
ASSERT_THROW(make_shared<op::v4::Swish>(data, beta);, ngraph::NodeValidationFailure);
97+
}

0 commit comments

Comments
 (0)
Please sign in to comment.