6 #include <boost/test/unit_test.hpp> 8 #include "../TfLiteParser.hpp" 17 explicit DepthToSpaceFixture(
const std::string& inputShape,
18 const std::string& outputShape,
19 const std::string& dataType =
"FLOAT32",
20 const std::string& scale =
"1.0",
21 const std::string& offset =
"0")
26 "operator_codes": [ { "builtin_code": "DEPTH_TO_SPACE" } ], 30 "shape": )" + inputShape + R"(, 31 "type": )" + dataType + R"(, 33 "name": "inputTensor", 37 "scale": [ )" + scale + R"( ], 38 "zero_point": [ )" + offset + R"( ], 42 "shape": )" + outputShape + R"(, 43 "type": )" + dataType + R"(, 45 "name": "outputTensor", 49 "scale": [ )" + scale + R"( ], 50 "zero_point": [ )" + offset + R"( ], 61 "builtin_options_type": "DepthToSpaceOptions", 65 "custom_options_format": "FLEXBUFFERS" 79 struct SimpleDepthToSpaceFixture :
public DepthToSpaceFixture
81 SimpleDepthToSpaceFixture() : DepthToSpaceFixture(
"[ 1, 2, 2, 4 ]",
"[ 1, 4, 4, 1 ]") {}
86 RunTest<4, armnn::DataType::Float32>
88 {{
"inputTensor", { 1.f, 2.f, 3.f, 4.f,
90 9.f, 10.f, 11.f, 12.f,
91 13.f, 14.f, 15.f, 16.f }}},
92 {{
"outputTensor", { 1.f, 2.f, 5.f, 6.f,
94 9.f, 10.f, 13.f, 14.f,
95 11.f, 12.f, 15.f, 16.f }}});
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
BOOST_AUTO_TEST_SUITE_END()
void SetupSingleInputSingleOutput(const std::string &inputName, const std::string &outputName)
BOOST_FIXTURE_TEST_CASE(ParseDepthToSpace, SimpleDepthToSpaceFixture)