| 662 | |
| 663 | template <typename integer_type, TensorType tensor_dtype> |
| 664 | void AdvancedDynamicTestV2() { |
| 665 | PadV2OpDynamicModel<integer_type> m({tensor_dtype, {1, 2, 3, 1}, -1.0, 1.0}, |
| 666 | {4, 2}, {tensor_dtype, {1}, -1.0, 1.0}, |
| 667 | {tensor_dtype, {}, -1.0, 1.0}); |
| 668 | m.template SetQuantizedInput<integer_type>({-0.8, 0.2, 0.9, 0.7, 0.1, -0.3}); |
| 669 | m.template SetQuantizedPadValue<integer_type>(0); |
| 670 | m.SetPaddings({0, 0, 0, 2, 1, 3, 0, 0}); |
| 671 | m.Invoke(); |
| 672 | EXPECT_THAT(m.template GetDequantizedOutput<integer_type>(), |
| 673 | ElementsAreArray(DequantizedArrayNear( |
| 674 | {0, -0.8, 0.2, 0.9, 0, 0, 0, 0, 0.7, 0.1, -0.3, 0, 0, 0, |
| 675 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
| 676 | -1.0, 1.0))); |
| 677 | EXPECT_THAT(m.GetOutputShape(), ElementsAreArray({1, 4, 7, 1})); |
| 678 | } |
| 679 | |
| 680 | TEST_F(QuantizedPadV2OpTest, UInt8AdvancedDynamicTest) { |
| 681 | AdvancedDynamicTestV2<uint8_t, TensorType_UINT8>(); |
nothing calls this directly
no test coverage detected