Do a test with the NN API using no activation.
| 160 | |
| 161 | // Do a test with the NN API using no activation. |
| 162 | TEST(NNAPIDelegate, AddWithNoActivation) { |
| 163 | FloatAddOpModel m({TensorType_FLOAT32, {1, 2, 2, 1}}, |
| 164 | {TensorType_FLOAT32, {1, 2, 2, 1}}, |
| 165 | {TensorType_FLOAT32, {}}, ActivationFunctionType_NONE); |
| 166 | m.PopulateTensor<float>(m.input1(), {-2.0, 0.2, 0.7, 0.8}); |
| 167 | m.PopulateTensor<float>(m.input2(), {0.1, 0.2, 0.3, 0.5}); |
| 168 | m.Invoke(); |
| 169 | EXPECT_THAT(m.GetOutput(), ElementsAreArray({-1.9, 0.4, 1.0, 1.3})); |
| 170 | } |
| 171 | |
| 172 | // Do a test with scalar input using no activation. |
| 173 | TEST(NNAPIDelegate, AddScalarWithNoActivation) { |
no test coverage detected