12 explicit TransposeFixture(
const std::string & inputShape,
13 const std::string & permuteData,
14 const std::string & outputShape)
21 "builtin_code": "TRANSPOSE", 29 "shape": )" + inputShape + R"(, 32 "name": "inputTensor", 41 "quantized_dimension": 0 46 "shape": )" + outputShape + R"(, 49 "name": "outputTensor", 52 "quantized_dimension": 0 63 "name": "permuteTensor", 66 "quantized_dimension": 0 82 m_JsonString += R"(,2)"; 87 "builtin_options_type": "TransposeOptions", 90 "custom_options_format": "FLEXBUFFERS" 95 "description": "TOCO Converted.", 99 if (!permuteData.empty())
101 m_JsonString += R
"(,{"data": )" + permuteData + R"( })"; 112 struct TransposeFixtureWithPermuteData : TransposeFixture
114 TransposeFixtureWithPermuteData() : TransposeFixture(
"[ 2, 2, 3 ]",
115 "[ 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0 ]",
121 RunTest<3, armnn::DataType::Float32>(
123 {{
"inputTensor", { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }}},
124 {{
"outputTensor", { 1, 4, 2, 5, 3, 6, 7, 10, 8, 11, 9, 12 }}});
126 CHECK((m_Parser->GetNetworkOutputBindingInfo(0,
"outputTensor").second.GetShape()
133 struct TransposeFixtureWithoutPermuteData : TransposeFixture
135 TransposeFixtureWithoutPermuteData() : TransposeFixture(
"[ 2, 2, 3 ]",
136 "[ 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ]",
140 TEST_CASE_FIXTURE(TransposeFixtureWithoutPermuteData,
"TransposeWithoutPermuteDims")
142 RunTest<3, armnn::DataType::Float32>(
144 {{
"inputTensor", { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }}},
145 {{
"outputTensor", { 1, 7, 4, 10, 2, 8, 5, 11, 3, 9, 6, 12 }}});
147 CHECK((m_Parser->GetNetworkOutputBindingInfo(0,
"outputTensor").second.GetShape()
TEST_CASE_FIXTURE(ClContextControlFixture, "CopyBetweenNeonAndGpu")
TEST_SUITE("TensorflowLiteParser_Transpose")
void Setup(bool testDynamic=true)