| 115 | } |
| 116 | |
| 117 | TEST(FloatPoolingOpTest, AveragePool) { |
| 118 | FloatPoolingOpModel m(BuiltinOperator_AVERAGE_POOL_2D, |
| 119 | /*input=*/{TensorType_FLOAT32, {1, 2, 4, 1}}, |
| 120 | /*filter_width=*/2, /*filter_height=*/2, |
| 121 | /*output=*/{TensorType_FLOAT32, {}}); |
| 122 | m.SetInput({ |
| 123 | 0, 6, 2, 4, // |
| 124 | 3, 2, 10, 7, // |
| 125 | }); |
| 126 | m.Invoke(); |
| 127 | EXPECT_THAT(m.GetOutput(), ElementsAreArray({2.75, 5.75})); |
| 128 | } |
| 129 | |
| 130 | TEST(FloatPoolingOpTest, AveragePoolActivationRelu) { |
| 131 | FloatPoolingOpModel m(BuiltinOperator_AVERAGE_POOL_2D, |
nothing calls this directly
no test coverage detected