6 #include <boost/test/unit_test.hpp> 8 #include "../TfLiteParser.hpp" 14 explicit TransposeConvFixture(
const std::string& inputShape,
15 const std::string& outputShape,
16 const std::string& filterShape,
17 const std::string& filterData,
18 const std::string& strideX,
19 const std::string& strideY,
20 const std::string& dataType)
25 "operator_codes": [ { "builtin_code": "TRANSPOSE_CONV" } ], 32 "name": "outputShapeTensor", 41 "shape": )" + filterShape + R"(, 42 "type": ")" + dataType + R"(", 44 "name": "filterTensor", 53 "shape": )" + inputShape + R"(, 54 "type": ")" + dataType + R"(", 56 "name": "inputTensor", 65 "shape": )" + outputShape + R"(, 66 "type": ")" + dataType + R"(", 68 "name": "outputTensor", 82 "inputs": [ 0, 1, 2 ], 84 "builtin_options_type": "TransposeConvOptions", 87 "stride_w": )" + strideX + R"(, 88 "stride_h": )" + strideY + R"( 90 "custom_options_format": "FLEXBUFFERS" 95 { "data": )" + outputShape + R"( }, 96 { "data": )" + filterData + R"( }, 106 struct SimpleTransposeConvFixture : TransposeConvFixture
108 SimpleTransposeConvFixture()
109 : TransposeConvFixture(
"[ 1, 2, 2, 1 ]",
121 RunTest<4, armnn::DataType::QAsymmU8>(
136 explicit TransposeConvFixtureWithBias(
const std::string& inputShape,
137 const std::string& outputShape,
138 const std::string& filterShape,
139 const std::string& filterData,
140 const std::string& strideX,
141 const std::string& strideY,
142 const std::string& dataType,
143 const std::string& biasShape,
144 const std::string& biasData)
149 "operator_codes": [ { "builtin_code": "TRANSPOSE_CONV" } ], 156 "name": "outputShapeTensor", 165 "shape": )" + filterShape + R"(, 166 "type": ")" + dataType + R"(", 168 "name": "filterTensor", 177 "shape": )" + inputShape + R"(, 178 "type": ")" + dataType + R"(", 180 "name": "inputTensor", 189 "shape": )" + biasShape + R"( , 192 "name": "biasTensor", 201 "shape": )" + outputShape + R"(, 202 "type": ")" + dataType + R"(", 204 "name": "outputTensor", 218 "inputs": [ 0, 1, 2, 3], 220 "builtin_options_type": "TransposeConvOptions", 223 "stride_w": )" + strideX + R"(, 224 "stride_h": )" + strideY + R"( 226 "custom_options_format": "FLEXBUFFERS" 231 { "data": )" + outputShape + R"( }, 232 { "data": )" + filterData + R"( }, 234 { "data": )" + biasData + R"( }, 239 SetupSingleInputSingleOutput("inputTensor",
"outputTensor");
243 struct SimpleTransposeConvFixtureWithBias : TransposeConvFixtureWithBias
245 SimpleTransposeConvFixtureWithBias()
246 : TransposeConvFixtureWithBias(
"[ 1, 2, 2, 1 ]",
260 RunTest<4, armnn::DataType::QAsymmU8>(
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
BOOST_AUTO_TEST_SUITE_END()
void SetupSingleInputSingleOutput(const std::string &inputName, const std::string &outputName)
BOOST_FIXTURE_TEST_CASE(ParseSimpleTransposeConv, SimpleTransposeConvFixture)