6 #include <boost/test/unit_test.hpp> 12 struct UnsupportedMaximumFixture
15 UnsupportedMaximumFixture()
57 struct SupportedMaximumFixture
60 SupportedMaximumFixture(
const std::string & maxInput0,
61 const std::string & maxInput1,
62 const std::string & mulInput0,
63 const std::string & mulInput1)
71 value { type: DT_FLOAT } 83 value { type: DT_FLOAT } 101 input: ")" + mulInput0 + R"(" 102 input: ")" + mulInput1 + R"(" 105 value { type: DT_FLOAT } 111 input: ")" + maxInput0 + R"(" 112 input: ")" + maxInput1 + R"(" 115 value { type: DT_FLOAT } 119 SetupSingleInputSingleOutput({ 1, 2 }, "graphInput",
"Maximum");
123 struct LeakyRelu_Max_MulAT_T_Fixture :
public SupportedMaximumFixture
125 LeakyRelu_Max_MulAT_T_Fixture()
126 : SupportedMaximumFixture(
"Mul",
"graphInput",
"Alpha",
"graphInput") {}
131 RunTest<2>(std::vector<float>({-5.0, 3.0}), {-0.5, 3.0});
134 struct LeakyRelu_Max_T_MulAT_Fixture :
public SupportedMaximumFixture
136 LeakyRelu_Max_T_MulAT_Fixture()
137 : SupportedMaximumFixture(
"graphInput",
"Mul",
"Alpha",
"graphInput") {}
143 RunTest<2>(std::vector<float>({-10.0, 3.0}), {-1.0, 3.0});
146 struct LeakyRelu_Max_MulTA_T_Fixture :
public SupportedMaximumFixture
148 LeakyRelu_Max_MulTA_T_Fixture()
149 : SupportedMaximumFixture(
"Mul",
"graphInput",
"graphInput",
"Alpha") {}
154 RunTest<2>(std::vector<float>({-5.0, 3.0}), {-0.5, 3.0});
157 struct LeakyRelu_Max_T_MulTA_Fixture :
public SupportedMaximumFixture
159 LeakyRelu_Max_T_MulTA_Fixture()
160 : SupportedMaximumFixture(
"graphInput",
"Mul",
"graphInput",
"Alpha") {}
165 RunTest<2>(std::vector<float>({-10.0, 13.0}), {-1.0, 13.0});
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
BOOST_FIXTURE_TEST_CASE(UnsupportedMaximum, UnsupportedMaximumFixture)
BOOST_AUTO_TEST_SUITE_END()
void SetupSingleInputSingleOutput(const std::string &inputName, const std::string &outputName)
Parses and loads the network defined by the m_Prototext string.