| 397 | } |
| 398 | |
| 399 | void MaxFP32Test() |
| 400 | { |
| 401 | std::vector<int32_t> input0Shape { 2, 2, 2, 2 }; |
| 402 | std::vector<int32_t> input1Shape { 2, 2, 2, 2 }; |
| 403 | std::vector<int32_t> expectedOutputShape { 2, 2, 2, 2 }; |
| 404 | |
| 405 | std::vector<float> input0Values = |
| 406 | { |
| 407 | 1.f, 1.f, 5.f, 1.f, 2.f, 2.f, 7.f, 2.f, |
| 408 | 3.f, 3.f, 3.f, 3.f, 4.f, 4.f, 4.f, 4.f |
| 409 | |
| 410 | }; |
| 411 | |
| 412 | std::vector<float> input1Values = |
| 413 | { |
| 414 | 2.f, 2.f, 2.f, 2.f, 3.f, 3.f, 3.f, 3.f, |
| 415 | 4.f, 4.f, 4.f, 4.f, 5.f, 5.f, 5.f, 5.f |
| 416 | }; |
| 417 | |
| 418 | std::vector<float> expectedOutputValues = |
| 419 | { |
| 420 | 2.f, 2.f, 5.f, 2.f, 3.f, 3.f, 7.f, 3.f, |
| 421 | 4.f, 4.f, 4.f, 4.f, 5.f, 5.f, 5.f, 5.f |
| 422 | }; |
| 423 | |
| 424 | ElementwiseBinaryTest<float>(tflite::BuiltinOperator_MAXIMUM, |
| 425 | tflite::ActivationFunctionType_NONE, |
| 426 | ::tflite::TensorType_FLOAT32, |
| 427 | input0Shape, |
| 428 | input1Shape, |
| 429 | expectedOutputShape, |
| 430 | input0Values, |
| 431 | input1Values, |
| 432 | expectedOutputValues); |
| 433 | } |
| 434 | |
| 435 | void MaxBroadcastTest() |
| 436 | { |
no outgoing calls
no test coverage detected