13 explicit BatchToSpaceNDFixture(
const std::string & inputShape,
14 const std::string & outputShape,
15 const std::string & blockShapeData,
16 const std::string & cropsData)
21 "operator_codes": [ { "builtin_code": "BATCH_TO_SPACE_ND" } ], 25 "shape": )" + inputShape + R"(, 28 "name": "inputTensor", 37 "shape": )" + outputShape + R"(, 40 "name": "outputTensor", 52 "name": "blockShapeTensor", 64 "name": "cropsTensor", 78 "inputs": [ 0, 2, 3 ], 80 "custom_options_format": "FLEXBUFFERS" 87 { "data": )" + blockShapeData + R"(, }, 88 { "data": )" + cropsData + R"(, }, 96 struct BatchToSpaceNDFixtureTest1 :
public BatchToSpaceNDFixture
98 BatchToSpaceNDFixtureTest1() : BatchToSpaceNDFixture(
"[ 4, 2, 2, 1 ]",
100 "[ 2,0,0,0, 2,0,0,0 ]",
101 "[ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 ]") {}
106 RunTest<4, armnn::DataType::Float32>
127 {{
"outputTensor", { 1.0f, 2.0f, 3.0f, 4.0f,
128 5.0f, 6.0f, 7.0f, 8.0f,
129 9.0f, 10.0f, 11.0f, 12.0f,
130 13.0f, 14.0f, 15.0f, 16.0f }}});
133 struct BatchToSpaceNDFixtureTest2 :
public BatchToSpaceNDFixture
135 BatchToSpaceNDFixtureTest2() : BatchToSpaceNDFixture(
"[ 4, 1, 1, 1 ]",
137 "[ 2,0,0,0, 2,0,0,0 ]",
138 "[ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 ]") {}
143 RunTest<4, armnn::DataType::Float32>
145 {{
"inputTensor", { 1.0f, 2.0f, 3.0f, 4.0f }}},
147 1.0f, 2.0f, 3.0f, 4.0f }}});
150 struct BatchToSpaceNDFixtureTest3 :
public BatchToSpaceNDFixture
152 BatchToSpaceNDFixtureTest3() : BatchToSpaceNDFixture(
"[ 4, 1, 1, 3 ]",
154 "[ 2,0,0,0, 2,0,0,0 ]",
155 "[ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 ]") {}
160 RunTest<4, armnn::DataType::Float32>
162 {{
"inputTensor", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f }}},
163 {{
"outputTensor", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f }}});
TEST_CASE_FIXTURE(ClContextControlFixture, "CopyBetweenNeonAndGpu")
void Setup(bool testDynamic=true)