| 379 | |
| 380 | template <typename integer_type, TensorType tensor_dtype> |
| 381 | void AdvancedConstTest() { |
| 382 | PadOpConstModel m({tensor_dtype, {1, 2, 3, 1}, -1.0, 1.0}, {4, 2}, |
| 383 | {0, 0, 0, 2, 1, 3, 0, 0}, {tensor_dtype, {}, -1.0, 1.0}); |
| 384 | m.template SetQuantizedInput<integer_type>({-0.8, 0.2, 0.9, 0.7, 0.1, -0.3}); |
| 385 | m.Invoke(); |
| 386 | EXPECT_THAT(m.template GetDequantizedOutput<integer_type>(), |
| 387 | ElementsAreArray(DequantizedArrayNear( |
| 388 | {0, -0.8, 0.2, 0.9, 0, 0, 0, 0, 0.7, 0.1, -0.3, 0, 0, 0, |
| 389 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
| 390 | -1.0, 1.0))); |
| 391 | EXPECT_THAT(m.GetOutputShape(), ElementsAreArray({1, 4, 7, 1})); |
| 392 | } |
| 393 | |
| 394 | TEST_F(QuantizedPadOpTest, UInt8AdvancedConstTest) { |
| 395 | AdvancedConstTest<uint8_t, TensorType_UINT8>(); |
nothing calls this directly
no test coverage detected