SpaceToBatchND Operator
| 80 | |
| 81 | // SpaceToBatchND Operator |
| 82 | void SpaceToBatchNDFp32Test() |
| 83 | { |
| 84 | std::vector<int32_t> inputShape { 1, 2, 2, 1 }; |
| 85 | std::vector<int32_t> expectedOutputShape { 4, 1, 1, 1 }; |
| 86 | |
| 87 | std::vector<float> inputValues { 1.0f, 2.0f, 3.0f, 4.0f }; |
| 88 | std::vector<float> expectedOutputValues { 1.0f, 2.0f, 3.0f, 4.0f }; |
| 89 | |
| 90 | std::vector<unsigned int> blockShape({2, 2}); |
| 91 | std::vector<std::pair<unsigned int, unsigned int>> padding = {{0, 0}, {0, 0}}; |
| 92 | |
| 93 | BatchSpaceTest<float>(tflite::BuiltinOperator_SPACE_TO_BATCH_ND, |
| 94 | ::tflite::TensorType_FLOAT32, |
| 95 | inputShape, |
| 96 | expectedOutputShape, |
| 97 | inputValues, |
| 98 | blockShape, |
| 99 | padding, |
| 100 | expectedOutputValues); |
| 101 | } |
| 102 | |
| 103 | void SpaceToBatchNDFp32PaddingTest() |
| 104 | { |