| 146 | }; |
| 147 | |
| 148 | TEST_P(DepthwiseConvolutionOpTest, ActivationReluTest) { |
| 149 | DepthwiseConvolutionOpModel m( |
| 150 | GetRegistration(), {TensorType_FLOAT32, {1, 3, 2, 2}}, |
| 151 | {TensorType_FLOAT32, {1, 2, 2, 4}}, {TensorType_FLOAT32, {}}, |
| 152 | Padding_VALID, |
| 153 | /*dilation_factor*/ 1, |
| 154 | /*stride_width*/ 1, |
| 155 | /*stride_height*/ 1, |
| 156 | /*ActivationFunctionType*/ ActivationFunctionType_RELU); |
| 157 | |
| 158 | m.SetInput({ |
| 159 | 1, 2, 7, 8, // column 1 |
| 160 | 3, 4, 9, 10, // column 2 |
| 161 | 5, 6, 11, 12, // column 3 |
| 162 | }); |
| 163 | m.SetFilter({ |
| 164 | 1, 2, 3, 4, // |
| 165 | -9, 10, -11, 12, // |
| 166 | 5, 6, 7, 8, // |
| 167 | 13, -14, 15, -16, // |
| 168 | }); |
| 169 | m.SetBias({1, 2, 3, 4}); |
| 170 | |
| 171 | m.Invoke(); |
| 172 | |
| 173 | EXPECT_THAT(m.GetOutput(), ElementsAreArray({ |
| 174 | 71, 0, 99, 0, // |
| 175 | 91, 0, 127, 0, // |
| 176 | })); |
| 177 | } |
| 178 | |
| 179 | TEST_P(DepthwiseConvolutionOpTest, ActivationReluN1Test) { |
| 180 | DepthwiseConvolutionOpModel m( |
nothing calls this directly
no test coverage detected