6 #include <boost/test/unit_test.hpp> 65 Setup({ { "input0", inputShape0 },
66 {
"input1", inputShape1 } },
71 struct MaximumFixture4D4D :
public MaximumFixture
73 MaximumFixture4D4D() : MaximumFixture({ 1, 2, 2, 3 }, { 1, 2, 2, 3 }) {}
78 RunTest<4>({ {
"input0", { 0.0f, 1.0f, 2.0f,
81 9.0f, 10.0f, 11.0f } },
82 {
"input1", { 5.0f, 1.0f, 3.0f,
85 19.0f, 1.0f, 3.0f } } },
86 { {
"output", { 5.0f, 1.0f, 3.0f,
89 19.0f, 10.0f, 11.0f } } });
92 struct MaximumBroadcastFixture4D4D :
public MaximumFixture
94 MaximumBroadcastFixture4D4D() : MaximumFixture({ 1, 1, 2, 1 }, { 1, 2, 1, 3 }) {}
99 RunTest<4>({ {
"input0", { 2.0f, 4.0f } },
100 {
"input1", { 1.0f, 2.0f, 3.0f,
101 4.0f, 5.0f, 6.0f } } },
102 { {
"output", { 2.0f, 2.0f, 3.0f,
105 4.0f, 5.0f, 6.0f } } });
108 struct MaximumBroadcastFixture4D1D :
public MaximumFixture
110 MaximumBroadcastFixture4D1D() : MaximumFixture({ 1, 2, 2, 3 }, { 1 }) {}
115 RunTest<4>({ {
"input0", { 0.0f, 1.0f, 2.0f,
118 9.0f, 10.0f, 11.0f } },
119 {
"input1", { 5.0f } } },
120 { {
"output", { 5.0f, 5.0f, 5.0f,
123 9.0f, 10.0f, 11.0f } } });
126 struct MaximumBroadcastFixture1D4D :
public MaximumFixture
128 MaximumBroadcastFixture1D4D() : MaximumFixture({ 1 }, { 1, 2, 2, 3 }) {}
133 RunTest<4>({ {
"input0", { 3.0f } },
134 {
"input1", { 0.0f, 1.0f, 2.0f,
137 9.0f, 10.0f, 11.0f } } },
138 { {
"output", { 3.0f, 3.0f, 3.0f,
141 9.0f, 10.0f, 11.0f } } });
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
BOOST_FIXTURE_TEST_CASE(ParseMaximum4D4D, MaximumFixture4D4D)
BOOST_AUTO_TEST_SUITE_END()