6 #include <boost/test/unit_test.hpp> 17 " name: \"graphInput\" \n" 18 " op: \"Placeholder\" \n" 34 " name: \"softmax1\" \n" 36 " input: \"graphInput\" \n" 45 " name: \"softmax2\"\n" 47 " input: \"graphInput\"\n" 56 " name: \"division\"\n" 58 " input: \"softmax1\"\n" 59 " input: \"softmax2\"\n" 74 RunTest<2>({ 2, 1.0f, 3, 1 }, { 1, 1.0f, 1, 1});
130 Setup({ { "input0", inputShape0 },
131 {
"input1", inputShape1 } },
135 struct DivisionBroadcastFixture4D1D :
public DivisionBroadcastFixture
137 DivisionBroadcastFixture4D1D() : DivisionBroadcastFixture({ 1, 2, 2, 3 }, { 1 }) {}
142 RunTest<4>({ {
"input0", { 0.0f, 100.0f, 2.0f,
145 35.0f, 10.0f, 55.0f } },
146 {
"input1", { 5.0f } } },
147 { {
"output", { 0, 20.0f, 0.4f,
150 7.0f, 2.0f, 11.0f } } });
155 float Inf = std::numeric_limits<float>::infinity();
156 float NaN = std::numeric_limits<float>::quiet_NaN();
158 RunTest<4>({ {
"input0", { 0.0f, -100.0f, 2.0f,
159 3.0f, -250.0f, 15.0f,
161 35.0f, -10.0f, 55.0f } },
162 {
"input1", { 0 } } },
163 { {
"output", { NaN, -Inf, Inf,
166 Inf, -Inf, Inf } } });
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
BOOST_FIXTURE_TEST_CASE(ParseDivision, DivisionFixture)
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.