6 #include <boost/test/unit_test.hpp> 8 #include "../TfLiteParser.hpp" 17 explicit PadFixture(
const std::string & inputShape,
18 const std::string & outputShape,
19 const std::string & padListShape,
20 const std::string & padListData)
25 "operator_codes": [ { "builtin_code": "PAD" } ], 29 "shape": )" + inputShape + R"(, 32 "name": "inputTensor", 41 "shape": )" + outputShape + R"(, 44 "name": "outputTensor", 53 "shape": )" + padListShape + R"( , 72 "custom_options_format": "FLEXBUFFERS" 79 { "data": )" + padListData + R"(, }, 87 struct SimplePadFixture :
public PadFixture
89 SimplePadFixture() : PadFixture(
"[ 2, 3 ]",
"[ 4, 7 ]",
"[ 2, 2 ]",
90 "[ 1,0,0,0, 1,0,0,0, 2,0,0,0, 2,0,0,0 ]") {}
95 RunTest<2, armnn::DataType::Float32>
97 {{
"inputTensor", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f }}},
98 {{
"outputTensor", { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
99 0.0f, 0.0f, 1.0f, 2.0f, 3.0f, 0.0f, 0.0f,
100 0.0f, 0.0f, 4.0f, 5.0f, 6.0f, 0.0f, 0.0f,
101 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }}});
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
BOOST_AUTO_TEST_SUITE_END()
void SetupSingleInputSingleOutput(const std::string &inputName, const std::string &outputName)
BOOST_FIXTURE_TEST_CASE(ParsePad, SimplePadFixture)