| 616 | |
| 617 | template <typename integer_type, TensorType tensor_dtype> |
| 618 | void SimpleDynamicTestV2() { |
| 619 | PadV2OpDynamicModel<integer_type> m({tensor_dtype, {1, 2, 2, 1}, -1.0, 1.0}, |
| 620 | {4, 2}, {tensor_dtype, {1}, -1.0, 1.0}, |
| 621 | {tensor_dtype, {}, -1.0, 1.0}); |
| 622 | m.template SetQuantizedInput<integer_type>({-0.8, 0.2, 0.9, 0.7}); |
| 623 | m.template SetQuantizedPadValue<integer_type>(0); |
| 624 | m.SetPaddings({0, 0, 1, 1, 1, 1, 0, 0}); |
| 625 | m.Invoke(); |
| 626 | EXPECT_THAT(m.template GetDequantizedOutput<integer_type>(), |
| 627 | ElementsAreArray(DequantizedArrayNear( |
| 628 | {0, 0, 0, 0, 0, -0.8, 0.2, 0, 0, 0.9, 0.7, 0, 0, 0, 0, 0}, |
| 629 | -1.0, 1.0))); |
| 630 | EXPECT_THAT(m.GetOutputShape(), ElementsAreArray({1, 4, 4, 1})); |
| 631 | } |
| 632 | |
| 633 | TEST_F(QuantizedPadV2OpTest, UInt8SimpleDynamicTest) { |
| 634 | SimpleDynamicTestV2<uint8_t, TensorType_UINT8>(); |
nothing calls this directly
no test coverage detected