11 #include <boost/test/unit_test.hpp> 17 SplitFixture(
bool withDimZero=
false) {
54 name: "multiplication" 141 Setup( { { "graphInput", { 1, 2, 2 , 2} } , {
"graphInput2", { 1, 2, 2 , 2} }},
142 {
"Relu_1",
"Relu_2" });
146 struct InputFirstSplitFixture : SplitFixture
148 InputFirstSplitFixture() : SplitFixture(
true) {}
154 (m_Parser->GetNetworkOutputBindingInfo(
"Relu_1").second.GetShape() ==
armnn::TensorShape({ 1, 1, 2, 2 })));
157 (m_Parser->GetNetworkOutputBindingInfo(
"Relu_2").second.GetShape() ==
armnn::TensorShape({ 1, 1, 2, 2 })));
159 RunTest<4>({ {
"graphInput", { -1.0f, -0.5f, 1.25f, -3.0f, 0.0f, 0.5f, -0.75f, 1.75f } } },
160 { {
"Relu_1", { 0.0f, 0.0f, 1.25f, 0.0f } },
161 {
"Relu_2", { 0.0f, 0.5f, 0.0f, 1.75f } } });
168 (m_Parser->GetNetworkOutputBindingInfo(
"Relu_1").second.GetShape() ==
armnn::TensorShape({ 1, 2, 2, 1 })));
171 (m_Parser->GetNetworkOutputBindingInfo(
"Relu_2").second.GetShape() ==
armnn::TensorShape({ 1, 2, 2, 1 })));
173 RunTest<4>({ {
"graphInput", { -1.0f, -0.5f, 1.25f, -3.0f, 0.0f, 0.5f, -0.75f , 1.75f } } ,
174 {
"graphInput2", { -1.0f, -0.5f, 1.25f, -3.0f, 0.0f, 0.5f, -0.75f , 1.75f } } },
175 { {
"Relu_1", { 1.0f, 1.5625f, 0, 0.5625f } },
176 {
"Relu_2", { 0.25, 9.0f, 0.25f, 3.0625f } } });
181 SplitLastDimFixture(
bool withDimZero=
false) {
235 name: "split/split_dim" 258 input: "split/split_dim" 376 Setup( { { "Placeholder", { 1, 2, 2 , 3} } },
377 {
"sub0",
"sub1",
"sub2" });
384 (m_Parser->GetNetworkOutputBindingInfo(
"sub0").second.GetShape() ==
armnn::TensorShape({ 1, 2, 2, 1 })));
387 (m_Parser->GetNetworkOutputBindingInfo(
"sub1").second.GetShape() ==
armnn::TensorShape({ 1, 2, 2, 1 })));
390 (m_Parser->GetNetworkOutputBindingInfo(
"sub2").second.GetShape() ==
armnn::TensorShape({ 1, 2, 2, 1 })));
392 RunTest<4>({ {
"Placeholder", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f } } },
393 { {
"sub0", { -2.0f, 1.0f, 4.0f, 7.0f } },
394 {
"sub1", { 0.0f, 3.0f, 6.0f, 9.0f } },
395 {
"sub2", { 2.0f, 5.0f, 8.0f, 11.0f } } });
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
void IgnoreUnused(Ts &&...)
DataLayout::NCHW DataLayout::NCHW DataLayout::NHWC DataLayout::NHWC true
BOOST_AUTO_TEST_SUITE_END()
BOOST_FIXTURE_TEST_CASE(ParseAxisOneSplitTwoFloat32, SimpleSplitFixtureFloat32)