| 58 | } |
| 59 | |
| 60 | void BatchToSpaceNDUint8Test() |
| 61 | { |
| 62 | std::vector<int32_t> inputShape { 4, 1, 1, 3 }; |
| 63 | std::vector<int32_t> expectedOutputShape { 1, 2, 2, 3 }; |
| 64 | |
| 65 | std::vector<uint8_t> inputValues { 1, 2, 3, 4, 5, 6, 7 }; |
| 66 | std::vector<uint8_t> expectedOutputValues { 1, 2, 3, 4, 5, 6, 7 }; |
| 67 | |
| 68 | std::vector<unsigned int> blockShape({2, 2}); |
| 69 | std::vector<std::pair<unsigned int, unsigned int>> crops = {{0, 0}, {0, 0}}; |
| 70 | |
| 71 | BatchSpaceTest<uint8_t>(tflite::BuiltinOperator_BATCH_TO_SPACE_ND, |
| 72 | ::tflite::TensorType_UINT8, |
| 73 | inputShape, |
| 74 | expectedOutputShape, |
| 75 | inputValues, |
| 76 | blockShape, |
| 77 | crops, |
| 78 | expectedOutputValues); |
| 79 | } |
| 80 | |
| 81 | // SpaceToBatchND Operator |
| 82 | void SpaceToBatchNDFp32Test() |