| 176 | } |
| 177 | |
| 178 | void AddActivationTest() |
| 179 | { |
| 180 | std::vector<int32_t> input0Shape { 1, 2, 2, 1 }; |
| 181 | std::vector<int32_t> input1Shape { 1, 2, 2, 1 }; |
| 182 | std::vector<int32_t> expectedOutputShape { 1, 2, 2, 1 }; |
| 183 | |
| 184 | std::vector<float> input0Values { 4.0f, 0.8f, 0.7f, -0.8f }; |
| 185 | std::vector<float> input1Values { 0.7f, -1.2f, 0.8f, 0.5f }; |
| 186 | std::vector<float> expectedOutputValues { 4.7f, 0.0f, 1.5f, 0.0f }; |
| 187 | |
| 188 | ElementwiseBinaryTest<float>(tflite::BuiltinOperator_ADD, |
| 189 | tflite::ActivationFunctionType_RELU, |
| 190 | ::tflite::TensorType_FLOAT32, |
| 191 | input0Shape, |
| 192 | input1Shape, |
| 193 | expectedOutputShape, |
| 194 | input0Values, |
| 195 | input1Values, |
| 196 | expectedOutputValues); |
| 197 | } |
| 198 | |
| 199 | void AddUint8Test() |
| 200 | { |
no outgoing calls
no test coverage detected