| 42 | } |
| 43 | |
| 44 | void ArgMinFP32Test(int axisValue) |
| 45 | { |
| 46 | // Set input data |
| 47 | std::vector<int32_t> inputShape { 1, 3, 2, 4 }; |
| 48 | std::vector<int32_t> outputShape { 1, 3, 2 }; |
| 49 | std::vector<int32_t> axisShape { 1 }; |
| 50 | |
| 51 | std::vector<float> inputValues = { 1.0f, 2.0f, 3.0f, 4.0f, |
| 52 | 5.0f, 6.0f, 7.0f, 8.0f, |
| 53 | |
| 54 | 10.0f, 20.0f, 30.0f, 40.0f, |
| 55 | 50.0f, 60.0f, 70.0f, 80.0f, |
| 56 | |
| 57 | 100.0f, 200.0f, 300.0f, 400.0f, |
| 58 | 500.0f, 600.0f, 700.0f, 800.0f }; |
| 59 | |
| 60 | std::vector<int32_t> expectedOutputValues = { 0, 0, |
| 61 | 0, 0, |
| 62 | 0, 0 }; |
| 63 | |
| 64 | ArgMinMaxTest<float, int32_t>(tflite::BuiltinOperator_ARG_MIN, |
| 65 | ::tflite::TensorType_FLOAT32, |
| 66 | inputShape, |
| 67 | axisShape, |
| 68 | outputShape, |
| 69 | inputValues, |
| 70 | expectedOutputValues, |
| 71 | axisValue, |
| 72 | ::tflite::TensorType_INT32); |
| 73 | } |
| 74 | |
| 75 | void ArgMaxUint8Test(int axisValue) |
| 76 | { |